94% 0-errors

Code Review | 0-Errors

WordPress plugin 0-Errors scored 94% 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: 5.9.2
  • 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 / 1,661 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.00MB] [CPU: ▼289.58ms] Passed 4 tests

A check of server-side resources used by 0-Errors
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0256.78 ▲7.93
Dashboard /wp-admin3.44 ▲0.0333.96 ▲0.36
Posts /wp-admin/edit.php3.66 ▲0.0238.94 ▲1.75
Add New Post /wp-admin/post-new.php6.91 ▼0.06100.51 ▼1,151.96
Media Library /wp-admin/upload.php3.32 ▲0.0224.77 ▼8.46

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

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

Browser metrics Passed 4 tests

Checking browser requirements for 0-Errors
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,806 ▲8415.84 ▲0.286.22 ▼0.232.09 ▼0.15
Dashboard /wp-admin2,912 ▲506.07 ▼0.11125.14 ▼15.36163.64 ▲2.40
Posts /wp-admin/edit.php2,711 ▲233.25 ▲0.0163.11 ▼3.38137.32 ▼4.28
Add New Post /wp-admin/post-new.php1,773 ▲10517.15 ▼0.97430.00 ▼5.90152.64 ▼7.33
Media Library /wp-admin/upload.php1,721 ▲235.48 ▼0.03147.88 ▲8.11186.91 ▼7.93

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
This plugin's 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
Even though no errors were found, 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
Please take a closer look at the following
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > 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
      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
      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
      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 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: debug, error_reporting, email errors, errors

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

"0-Errors" version 0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • 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

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
Good job! No executable or dangerous file extensions detected937 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP6133326494
CSS24710327
JavaScript12625116

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
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

All PNG images should be compressed to minimize bandwidth usage for end users
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%