78% wponerror

Code Review | WpOnError

WordPress plugin WpOnError scored78%from 54 tests.

About plugin

  • Plugin page: wponerror
  • Plugin version: 1.1.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.0
  • WordPress version: 6.3.1
  • First release: Jul 26, 2021
  • Latest release: May 30, 2022
  • Number of updates: 26
  • Update frequency: every 11.8 days
  • Top authors: vitoranguia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,195 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.16MB] [CPU: ▼7.61ms] Passed 4 tests

This is a short check of server-side resources used by WpOnError
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1444.76 ▲4.60
Dashboard /wp-admin3.47 ▲0.1749.66 ▼3.69
Posts /wp-admin/edit.php3.52 ▲0.1648.53 ▼3.09
Add New Post /wp-admin/post-new.php6.07 ▲0.1887.23 ▼25.31
Media Library /wp-admin/upload.php3.39 ▲0.1638.18 ▲1.64
Settings /wp-admin/edit.php?post_type=wponerror&page=wponerror3.7639.92

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 465 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WpOnError
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,903 ▲14213.52 ▼0.838.19 ▲6.4838.57 ▼4.15
Dashboard /wp-admin2,225 ▲445.69 ▼0.0298.41 ▼3.8343.81 ▲0.85
Posts /wp-admin/edit.php2,132 ▲352.07 ▲0.0937.72 ▲1.2432.36 ▼2.27
Add New Post /wp-admin/post-new.php1,549 ▲1423.01 ▲4.59662.52 ▼16.3655.22 ▼23.04
Media Library /wp-admin/upload.php1,427 ▲334.28 ▲0.03101.49 ▼16.1842.40 ▼7.69
Settings /wp-admin/edit.php?post_type=wponerror&page=wponerror8522.2627.5227.28

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% 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 0% 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 fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wponerror/vendor/cmb2/cmb2/apigen/hook-docs.php
  • 57× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/wponerror/vendor/cmb2/cmb2/tests/cmb-tests-base.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Counter_Base' not found in wp-content/plugins/wponerror/vendor/cmb2/cmb2/includes/types/CMB2_Type_Text.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/wponerror/vendor/cmb2/cmb2/includes/types/CMB2_Type_Taxonomy_Multicheck.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Hookup_Base' not found in wp-content/plugins/wponerror/vendor/cmb2/cmb2/includes/CMB2_Hookup.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_REST_Controller' not found in wp-content/plugins/wponerror/vendor/cmb2/cmb2/includes/rest-api/CMB2_REST_Controller_Boxes.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Radio' not found in wp-content/plugins/wponerror/vendor/cmb2/cmb2/includes/types/CMB2_Type_Multicheck.php:13
    • > PHP Fatal error
      require_once(): Failed opening required '/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/wponerror/vendor/cmb2/cmb2/tests/bootstrap.php on line 24
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/wponerror/vendor/cmb2/cmb2/includes/types/CMB2_Type_File_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/wponerror/vendor/cmb2/cmb2/tests/cmb-tests-base.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Base' not found in wp-content/plugins/wponerror/vendor/cmb2/cmb2/includes/CMB2.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
2 plugin tags: javascript, windowonerror

wponerror/wponerror.php 92% from 13 tests

The principal PHP file in "WpOnError" v. 1.1.2 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Git Repository: An alternative Git repository was detected

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin64,436 lines of code in 282 files:
LanguageFilesBlank linesComment linesLines of code
PO File12014,31518,50232,323
PHP863,3307,15212,450
CSS143571,2065,004
XML3004,505
JSON8004,478
JavaScript155328062,779
Sass17306291,411
Markdown1133001,050
Bourne Shell46745209
YAML2116193
diff216834

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity17.31
▷ Minimum class complexity1.00
▷ Maximum class complexity188.00
Average method complexity2.70
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes94
▷ Abstract classes1212.77%
▷ Concrete classes8287.23%
▷ Final classes00.00%
Methods906
▷ Static methods14616.11%
▷ Public methods77084.99%
▷ Protected methods12914.24%
▷ Private methods70.77%
Functions38
▷ Named functions3797.37%
▷ Anonymous functions12.63%
Constants16
▷ Global constants1062.50%
▷ Class constants637.50%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
22 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/cmb2/cmb2/images/ui-icons_cd0a0a_256x240.png4.27KB4.11KB▼ 3.78%
vendor/cmb2/cmb2/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%
vendor/cmb2/cmb2/apigen/theme-bootstrap/src/resources/resize.png0.12KB0.10KB▼ 13.22%
vendor/cmb2/cmb2/apigen/theme-bootstrap/src/resources/tree-vertical.png0.12KB0.08KB▼ 31.50%
vendor/cmb2/cmb2/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%