10% hercules-posts-list

Code Review | Hercules Posts List

WordPress plugin Hercules Posts List scored 10% from 54 tests.

About plugin

  • Plugin page: hercules-posts-list
  • Plugin version: 1.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4
  • WordPress version: 6.3.1
  • First release: Sep 1, 2015
  • Latest release: Mar 29, 2016
  • Number of updates: 6
  • Update frequency: every 35.0 days
  • Top authors: toddnestor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 760 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Compile error in wp-content/plugins/hercules-posts-list/hercules-framework/helpers/string/string.php+5
    Cannot use 'String' as class name as it is reserved

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

Server-side resources used by Hercules Posts List
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.06 ▼6.99
Dashboard /wp-admin3.31 ▲0.0046.59 ▼1.02
Posts /wp-admin/edit.php3.36 ▲0.0050.57 ▲1.18
Add New Post /wp-admin/post-new.php5.89 ▲0.0096.47 ▼2.16
Media Library /wp-admin/upload.php3.23 ▲0.0035.35 ▲0.53

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

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

Browser metrics Passed 4 tests

Hercules Posts List: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.59 ▼0.794.49 ▲2.7737.96 ▼3.41
Dashboard /wp-admin2,206 ▲215.85 ▲1.02114.80 ▼1.9043.30 ▼0.97
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0540.62 ▼0.8036.10 ▼1.10
Add New Post /wp-admin/post-new.php1,534 ▲1422.99 ▼0.05668.89 ▲51.0660.98 ▲11.17
Media Library /wp-admin/upload.php1,385 ▼34.18 ▼0.04100.45 ▼4.6644.22 ▼1.40

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/hercules-posts-list/views/post-settings/template.php
    • > /wp-content/plugins/hercules-posts-list/views/posts-list/template.php
    • > /wp-content/plugins/hercules-posts-list/plugin.php
  • 28× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Hercules\\Helper' not found in wp-content/plugins/hercules-posts-list/hercules-framework/helpers/handlebars/handlebars.php:14
    • > PHP Fatal error
      Cannot use Handlebars\\String as String because 'String' is a special class name in wp-content/plugins/hercules-posts-list/hercules-framework/helpers/handlebars/src/Handlebars/Loader/StringLoader.php on line 22
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/hercules-posts-list/hercules-framework/helpers/handlebars/src/Handlebars/Tokenizer.php on line 167
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/hercules-posts-list/hercules-framework/helpers/handlebars/src/Handlebars/Tokenizer.php on line 213
    • > PHP Fatal error
      Uncaught Error: Interface 'Handlebars\\Helper' not found in wp-content/plugins/hercules-posts-list/hercules-framework/helpers/handlebars/src/Handlebars/Helper/IfEqHelper.php:39
    • > PHP Fatal error
      Uncaught Error: Class 'Hercules\\HercAbstract' not found in wp-content/plugins/hercules-posts-list/hercules-framework/core/Helper.php:3
    • > PHP Fatal error
      Uncaught Error: Interface 'Handlebars\\Helper' not found in wp-content/plugins/hercules-posts-list/hercules-framework/helpers/handlebars/src/Handlebars/Helper/UnlessHelper.php:39
    • > PHP Fatal error
      Uncaught Error: Interface 'Handlebars\\Cache' not found in wp-content/plugins/hercules-posts-list/hercules-framework/helpers/handlebars/src/Handlebars/Cache/APC.php:34
    • > PHP Fatal error
      Uncaught Error: Class 'Hercules\\HercAbstract' not found in wp-content/plugins/hercules-posts-list/hercules-framework/core/Model.php:3
    • > PHP Fatal error
      Uncaught Error: Interface 'Handlebars\\Helper' not found in wp-content/plugins/hercules-posts-list/hercules-framework/helpers/handlebars/src/Handlebars/Helper/IfHelper.php:39

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

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
3 plugin tags: hercules, categories, posts list

hercules-posts-list/plugin.php 92% from 13 tests

The main PHP script in "Hercules Posts List" version 1.2.3 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("hercules-posts-list.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin2,632 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code
PHP455942,2622,631
CSS1041

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity11.44
▷ Minimum class complexity1.00
▷ Maximum class complexity101.00
Average method complexity3.07
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces6
Interfaces3
Traits0
Classes36
▷ Abstract classes12.78%
▷ Concrete classes3597.22%
▷ Final classes00.00%
Methods202
▷ Static methods20.99%
▷ Public methods16883.17%
▷ Protected methods178.42%
▷ Private methods178.42%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants33
▷ Global constants00.00%
▷ Class constants33100.00%
▷ Public constants33100.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
2 PNG files occupy 0.17MB with 0.11MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png123.14KB49.03KB▼ 60.18%
screenshot-1.png51.66KB18.69KB▼ 63.81%