84% 0-errors

Code Review | 0-Errors

WordPress plugin 0-Errors scored84%from 54 tests.

About plugin

  • Plugin page: 0-errors
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.1
  • WordPress version: 6.3.1
  • First release: Jan 20, 2015
  • Latest release: Jan 28, 2015
  • Number of updates: 13
  • Update frequency: every 0.9 days
  • Top authors: brooksX (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,172 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼4.43ms] Passed 4 tests

Analyzing server-side resources used by 0-Errors
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1143.70 ▲8.19
Dashboard /wp-admin3.41 ▲0.1148.52 ▲0.54
Posts /wp-admin/edit.php3.53 ▲0.1746.72 ▼2.57
Add New Post /wp-admin/post-new.php5.99 ▲0.1182.72 ▼15.75
Media Library /wp-admin/upload.php3.34 ▲0.1135.56 ▲0.06

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for 0-Errors
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7013.26 ▼1.114.22 ▲2.5443.86 ▲5.00
Dashboard /wp-admin2,219 ▲285.89 ▲1.02101.13 ▼0.9342.67 ▼0.77
Posts /wp-admin/edit.php2,102 ▲132.01 ▲0.0435.41 ▼5.1935.20 ▼0.39
Add New Post /wp-admin/post-new.php1,547 ▲1323.37 ▼0.04681.71 ▲31.8353.44 ▲4.33
Media Library /wp-admin/upload.php1,401 ▲164.28 ▼0.0194.94 ▼19.8840.10 ▼8.64

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      require(ABSPATHwp-admin/options-head.php): failed to open stream: No such file or directory in wp-content/plugins/0-errors/inc/stgs-page.php on line 13
    • > PHP Fatal error
      require(): Failed opening required 'ABSPATHwp-admin/options-head.php' (include_path='.:/usr/share/php') in wp-content/plugins/0-errors/inc/stgs-page.php on line 13
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/0-errors/inc/stgs-page.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/0-errors/0-errors.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: debug, email errors, errors, error_reporting

0-errors/0-errors.php 92% from 13 tests

Analyzing the main PHP file in "0-Errors" version 0.2
The following require your attention:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin937 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP6133326494
CSS24710327
JavaScript12625116

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity20.00
▷ Minimum class complexity9.00
▷ Maximum class complexity34.00
Average method complexity2.73
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods33
▷ Static methods39.09%
▷ Public methods3296.97%
▷ Protected methods13.03%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants15
▷ Global constants15100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
css/img/close.png0.71KB0.36KB▼ 49.45%