93% tdwfb

Code Review | The Day We Fight Back

WordPress plugin The Day We Fight Back scored 93% from 54 tests.

About plugin

  • Plugin page: tdwfb
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress version: 5.8.1
  • First release: Feb 9, 2014
  • Latest release: Feb 10, 2014
  • Number of updates: 9
  • Update frequency: every 0.1 days
  • Top authors: modemlooper (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

100+ active / 5,535 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼139.67ms] Passed 4 tests

Server-side resources used by The Day We Fight Back
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1234.56 ▲10.33
Dashboard /wp-admin3.07 ▲0.0147.47 ▲3.19
Posts /wp-admin/edit.php3.12 ▲0.0143.69 ▲0.74
Add New Post /wp-admin/post-new.php5.43 ▲0.0093.74 ▼548.16
Media Library /wp-admin/upload.php3.01 ▲0.0025.61 ▼14.46
TDWFB /wp-admin/options-general.php?page=tdwfb2.9828.67

Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] Passed 3 tests

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for The Day We Fight Back
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,719 ▲8215.93 ▲0.4010.06 ▲0.0852.10 ▲2.70
Dashboard /wp-admin2,978 ▲475.91 ▼0.21138.70 ▼7.37111.65 ▼1.07
Posts /wp-admin/edit.php2,744 ▲82.71 ▲0.0164.24 ▼0.9298.09 ▲9.44
Add New Post /wp-admin/post-new.php1,675 ▼19718.88 ▼0.31380.05 ▼7.48108.15 ▼0.68
Media Library /wp-admin/upload.php1,809 ▼15.04 ▼0.02143.38 ▼1.85118.42 ▼2.87
TDWFB /wp-admin/options-general.php?page=tdwfb1,0772.0953.6280.83

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/tdwfb/admin.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/tdwfb/admin.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: nsa, the day we fight back

tdwfb/loader.php 77% from 13 tests

Analyzing the main PHP file in "The Day We Fight Back" version 1.1
Please take the time to fix the following:
  • Domain Path: The domain path folder was not found ("/languages")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("tdwfb.php" instead of "loader.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected96 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2428196

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin