84% hercules-edit-most-recent-post

Code Review | Hercules Edit Most Recent Post

WordPress plugin Hercules Edit Most Recent Post scored84%from 54 tests.

About plugin

  • Plugin page: hercules-edit-mos...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0
  • WordPress version: 6.3.1
  • First release: Jan 13, 2015
  • Latest release: Jan 18, 2015
  • Number of updates: 3
  • Update frequency: every 1.7 days
  • Top authors: toddnestor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /797 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
Installer ran successfully

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

Analyzing server-side resources used by Hercules Edit Most Recent Post
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.64 ▼3.35
Dashboard /wp-admin3.32 ▼0.0349.11 ▼20.19
Posts /wp-admin/edit.php3.37 ▲0.0050.97 ▲1.63
Add New Post /wp-admin/post-new.php5.91 ▲0.0288.78 ▼16.05
Media Library /wp-admin/upload.php3.25 ▲0.0237.28 ▲0.83
Edit most recent post /wp-admin/post.php?post=1&action=edit5.9179.00

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Hercules Edit Most Recent Post: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲7214.33 ▼0.021.81 ▼0.0842.46 ▲0.05
Dashboard /wp-admin2,202 ▲255.59 ▼0.0484.33 ▼16.8640.43 ▼2.71
Posts /wp-admin/edit.php2,104 ▲12.01 ▲0.0337.65 ▼2.7335.20 ▲0.17
Add New Post /wp-admin/post-new.php1,529 ▲323.59 ▲0.70645.78 ▼25.5453.25 ▼2.11
Media Library /wp-admin/upload.php1,404 ▲14.18 ▼0.0396.57 ▼1.4242.07 ▼7.73
Edit most recent post /wp-admin/post.php?post=1&action=edit1,62417.57926.1933.39

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hercules-edit-most-recent-post/hercules_edit_last_post.php:22

User-side errors Passed 1 test

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

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: menu, posts, wp-admin, hercules

hercules-edit-most-recent-post/hercules_edit_last_post.php 92% from 13 tests

"Hercules Edit Most Recent Post" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("hercules-edit-most-recent-post.php" instead of "hercules_edit_last_post.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin27 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP192727

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.00
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin