84% herp-derp

Code Review | Herp Derp

WordPress plugin Herp Derp scored84%from 54 tests.

About plugin

  • Plugin page: herp-derp
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-6.0.2
  • WordPress version: 6.3.1
  • First release: Dec 19, 2012
  • Latest release: Sep 11, 2022
  • Number of updates: 23
  • Update frequency: every 154.5 days
  • Top authors: jwz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,406 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Herp Derp
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0135.70 ▼6.34
Dashboard /wp-admin3.32 ▼0.0344.98 ▼12.44
Posts /wp-admin/edit.php3.37 ▲0.0146.96 ▼3.56
Add New Post /wp-admin/post-new.php5.90 ▲0.0181.69 ▼34.85
Media Library /wp-admin/upload.php3.25 ▲0.0137.06 ▲4.24

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Herp Derp
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲5414.72 ▼0.001.70 ▲0.0835.31 ▼7.69
Dashboard /wp-admin2,195 ▲185.69 ▲0.0392.19 ▲7.4436.02 ▼6.30
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0239.57 ▲3.5936.23 ▼0.05
Add New Post /wp-admin/post-new.php1,529 ▲323.34 ▲0.03672.12 ▼3.9453.32 ▼0.88
Media Library /wp-admin/upload.php1,400 ▼04.35 ▲0.12111.58 ▲18.7444.43 ▲3.82

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/herp-derp/herpderp.php:33

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

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
2 plugin tags: derp, herp

herp-derp/herpderp.php 92% from 13 tests

"Herp Derp" version 1.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("herp-derp.php" instead of "herpderp.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin152 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1231896
PHP1203456

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin