68% hedmansoft-milestones

Code Review | HedmanSoft Milestones

WordPress plugin HedmanSoft Milestones scored68%from 54 tests.

About plugin

  • Plugin page: hedmansoft-milest...
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9.6
  • WordPress version: 6.3.1
  • First release: Jun 8, 2018
  • Latest release: Jun 15, 2018
  • Number of updates: 6
  • Update frequency: every 1.3 days
  • Top authors: donhedman (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /563 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▼0.95MB] [CPU: ▼37.88ms] Passed 4 tests

A check of server-side resources used by HedmanSoft Milestones
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.79 ▼22.58
Dashboard /wp-admin2.99 ▼0.3125.15 ▼23.16
Posts /wp-admin/edit.php2.99 ▼0.3624.26 ▼29.79
Add New Post /wp-admin/post-new.php2.99 ▼2.8922.97 ▼76.00
Media Library /wp-admin/upload.php2.99 ▼0.2324.34 ▼11.60
HedmanSoft Milestones /wp-admin/options-general.php?page=HedmanSoft_Milestones2.9922.72

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

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

Browser metrics Passed 4 tests

A check of browser resources used by HedmanSoft Milestones
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲8913.40 ▼0.992.19 ▼0.5742.24 ▲4.23
Dashboard /wp-admin2,214 ▲235.92 ▲1.00113.59 ▲10.8643.32 ▲4.18
Posts /wp-admin/edit.php2,097 ▲52.11 ▲0.1136.15 ▼4.9033.17 ▼3.71
Add New Post /wp-admin/post-new.php1,521 ▲217.87 ▼5.31696.38 ▲40.5254.40 ▼2.71
Media Library /wp-admin/upload.php1,396 ▲84.43 ▲0.2493.71 ▼11.4442.05 ▼2.45
HedmanSoft Milestones /wp-admin/options-general.php?page=HedmanSoft_Milestones8842.2428.1126.10

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • hs_milestones_configuration

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=HedmanSoft_Milestones
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/options-general.php?page=HedmanSoft_Milestones
    • > Notice in wp-content/plugins/hedmansoft-milestones/hedmansoft_milestones_admin.php+7
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/options-general.php?page=HedmanSoft_Milestones
    • > Notice in wp-content/plugins/hedmansoft-milestones/hedmansoft_milestones_admin.php+12
    Undefined index: hsmilestones_action

SRP 50% 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 take a closer look at the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/hedmansoft-milestones/hedmansoft_milestones_admin.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hedmansoft-milestones/hedmansoft_milestones.php:37

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

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
1 plugin tags: milestones

hedmansoft-milestones/hedmansoft_milestones.php 92% from 13 tests

The primary PHP file in "HedmanSoft Milestones" version 1.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("hedmansoft-milestones.php" instead of "hedmansoft_milestones.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin961 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
CSS26815536
PHP22219424
JavaScript1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.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 files were detected