10% forty-four

Code Review | Forty Four - 404 Plugin for WordPress

WordPress plugin Forty Four - 404 Plugin for WordPress scored10%from 54 tests.

About plugin

  • Plugin page: forty-four
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7
  • WordPress version: 6.3.1
  • First release: Feb 9, 2016
  • Latest release: Aug 17, 2016
  • Number of updates: 14
  • Update frequency: every 21.9 days
  • Top authors: phpbits (100%)

Code review

54 tests

User reviews

145 reviews

Install metrics

1,000+ active /23,321 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/forty-four/admin/functions.settings.php+392
    Function create_function() is deprecated

Server metrics [RAM: ▼1.75MB] [CPU: ▼54.04ms] Passed 4 tests

This is a short check of server-side resources used by Forty Four - 404 Plugin for WordPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.24 ▼1.226.33 ▼34.28
Dashboard /wp-admin2.26 ▼1.046.44 ▼43.68
Posts /wp-admin/edit.php2.26 ▼1.097.34 ▼39.29
Add New Post /wp-admin/post-new.php2.26 ▼3.628.41 ▼98.91
Media Library /wp-admin/upload.php2.26 ▼0.977.12 ▼28.87
404 Page /wp-admin/themes.php?page=fortyfourwp_opts2.277.20

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 31 new files
Database: 1 new table, 9 new options
New tables
wp_fortyfour_logs
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
fortyfourwp_general
theysaidso_admin_options
widget_recent-comments
fortyfourwp_installDate
FORTYFOURWP_VERSION
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Forty Four - 404 Plugin for WordPress
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.34 ▲0.171.68 ▲0.0837.57 ▼4.00
Dashboard /wp-admin2,204 ▲275.53 ▼0.1883.17 ▼4.0538.52 ▼4.42
Posts /wp-admin/edit.php2,106 ▲92.01 ▼0.0337.96 ▼2.8633.52 ▼2.46
Add New Post /wp-admin/post-new.php1,540 ▲1418.61 ▼4.94607.43 ▼30.2074.85 ▲26.21
Media Library /wp-admin/upload.php1,406 ▲34.20 ▼0.0496.08 ▼4.0841.49 ▲0.54
404 Page /wp-admin/themes.php?page=fortyfourwp_opts2,3337.83173.40117.73

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 25% from 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/forty-four/admin/functions.settings.php+392
    Function create_function() is deprecated
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_fortyfour_logs
  • Zombie WordPress options detected upon uninstall: 9 options
    • widget_theysaidso_widget
    • fortyfourwp_general
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • fortyfourwp_installDate
    • FORTYFOURWP_VERSION
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/themes.php?page=fortyfourwp_opts
    • > Deprecated in wp-content/plugins/forty-four/admin/functions.settings.php+392
    Function create_function() is deprecated
    • > GET request to /wp-admin/themes.php?page=fortyfourwp_opts
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/themes.php?page=fortyfourwp_opts
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 10× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/forty-four/core/functions.notices.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/forty-four/core/functions.init.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/forty-four/core/functions.table.php:6
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/forty-four/admin/functions.list-table.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/forty-four/admin/functions.settings.php:392
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/forty-four/admin/functions.list-table.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/forty-four/admin/functions.ajax.php:6
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/forty-four/admin/functions.list-table.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/forty-four/core/functions.display.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/forty-four/views/page-404.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 (404 Page Design), #2 (General Settings), #3 (404 Logs and Redirect)
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
You can take inspiration from this readme.txt

forty-four/plugin.php 85% from 13 tests

The principal PHP file in "Forty Four - 404 Plugin for WordPress" v. 1.4 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("forty-four.php" instead of "plugin.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 144 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected9,302 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP132202158,622
CSS3104163338
Sass1185229
JavaScript299101
SVG10012

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity22.75
▷ Minimum class complexity9.00
▷ Maximum class complexity36.00
Average method complexity3.23
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods39
▷ Static methods12.56%
▷ Public methods39100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.57MB with 0.31MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png38.84KB18.08KB▼ 53.45%
screenshot-1.png476.70KB183.98KB▼ 61.41%
screenshot-2.png65.81KB32.76KB▼ 50.22%