78% milestone

Code Review | Milestone

WordPress plugin Milestone scored78%from 54 tests.

About plugin

  • Plugin page: milestone
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.4
  • WordPress version: 6.3.1
  • First release: Aug 20, 2012
  • Latest release: Oct 15, 2012
  • Number of updates: 8
  • Update frequency: every 7.1 days
  • Top authors: fergbrain (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active /12,259 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼4.29ms] Passed 4 tests

Analyzing server-side resources used by Milestone
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0441.52 ▼3.03
Dashboard /wp-admin3.35 ▲0.0546.77 ▼4.41
Posts /wp-admin/edit.php3.40 ▲0.0445.26 ▼3.27
Add New Post /wp-admin/post-new.php5.93 ▲0.0485.52 ▼6.46
Media Library /wp-admin/upload.php3.27 ▲0.0436.60 ▲3.51

Server storage [IO: ▲0.08MB] [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: 12 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_fergcorp_milestone
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Milestone
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.26 ▼1.121.78 ▼0.3443.90 ▼2.83
Dashboard /wp-admin2,208 ▲204.87 ▼1.00109.67 ▲3.3839.64 ▼4.93
Posts /wp-admin/edit.php2,091 ▲22.04 ▲0.0333.89 ▼4.2031.38 ▼2.88
Add New Post /wp-admin/post-new.php1,516 ▲10517.47 ▼0.38688.44 ▲60.0559.34 ▼1.46
Media Library /wp-admin/upload.php1,393 ▲54.19 ▼0.01107.49 ▲10.7447.25 ▲4.24

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
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_fergcorp_milestone
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% 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)
Good news, no errors were detected

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
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/milestone/tests/bootstrap.php
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/milestone/fergcorp_milestone.php on line 54
    • > PHP Fatal error
      require_once(): Failed opening required 'fergcorp_milestone.php' (include_path='.:/usr/share/php') in wp-content/plugins/milestone/tests/MilestoneTest.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/milestone/fergcorp_milestone.php:56
    • > PHP Warning
      require_once(fergcorp_milestone.php): failed to open stream: No such file or directory in wp-content/plugins/milestone/tests/MilestoneTest.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
These attributes need your attention:
  • Screenshots: These screenshots do not have images: #1 (Widget Interface), #2 (Example on Blog)
The official readme.txt is a good inspiration

milestone/fergcorp_milestone.php 92% from 13 tests

The main PHP file in "Milestone" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("milestone.php" instead of "fergcorp_milestone.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin566 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP313572386
CSS19093
PO File1203869
XML10018

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity12.00
▷ Minimum class complexity11.00
▷ Maximum class complexity13.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png15.92KB4.07KB▼ 74.45%
screenshot-1.png26.68KB7.45KB▼ 72.09%