10% hercules-recent-posts-from-the-network

Code Review | Hercules Recent Posts from Network

WordPress plugin Hercules Recent Posts from Network scored 10% from 54 tests.

About plugin

  • Plugin page: hercules-recent-p...
  • Plugin version: 1.1
  • 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: 4
  • Update frequency: every 1.3 days
  • Top authors: toddnestor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 919 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • The plugin did not install without errors
    • > Error in wp-content/plugins/hercules-recent-posts-from-the-network/HerculesRecentPostsfromNetwork.php+32
    Uncaught Error: Call to undefined function get_current_site() in wp-content/plugins/hercules-recent-posts-from-the-network/HerculesRecentPostsfromNetwork.php:32
    Stack trace:
    #0 wp-content/plugins/hercules-recent-posts-from-the-network/HerculesRecentPostsfromNetwork.php(98): HerculesRecentPostsFromNetwork->__construct()
    #1 wp-admin/includes/plugin.php(2318): include_once('/var/www/wordpr...')
    #2 wp-admin/includes/plugin.php(663): plugin_sandbox_scrape()

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

A check of server-side resources used by Hercules Recent Posts from Network
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0048.91 ▲8.71
Dashboard /wp-admin3.31 ▲0.0045.15 ▼14.63
Posts /wp-admin/edit.php3.36 ▲0.0048.19 ▼0.56
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.43 ▲4.90
Media Library /wp-admin/upload.php3.23 ▲0.0033.45 ▼0.16

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Hercules Recent Posts from Network
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.25 ▼1.505.26 ▲3.3743.45 ▼8.90
Dashboard /wp-admin2,206 ▲155.85 ▲0.94107.53 ▲4.5643.16 ▼2.47
Posts /wp-admin/edit.php2,092 ▲32.02 ▲0.0439.30 ▼0.8836.73 ▼0.28
Add New Post /wp-admin/post-new.php1,519 ▲523.10 ▲5.62612.42 ▼79.5059.62 ▲1.90
Media Library /wp-admin/upload.php1,388 ▲34.23 ▲0.0394.88 ▼3.0041.21 ▼4.49

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 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-recent-posts-from-the-network/HerculesRecentPostsfromNetwork.php:27

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: posts, network, recent posts, hercules

hercules-recent-posts-from-the-network/HerculesRecentPostsfromNetwork.php 92% from 13 tests

The principal PHP file in "Hercules Recent Posts from Network" v. 1.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("hercules-recent-posts-from-the-network.php" instead of "HerculesRecentPostsfromNetwork.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin165 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14860165

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity13.00
▷ Minimum class complexity11.00
▷ Maximum class complexity15.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods112.50%
▷ Public methods787.50%
▷ Protected methods00.00%
▷ Private methods112.50%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected