90% wp-ampm

Code Review | Wordpress AM/PM Plugin

WordPress plugin Wordpress AM/PM Plugin scored90%from 54 tests.

About plugin

  • Plugin page: wp-ampm
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9.1
  • WordPress version: 6.3.1
  • First release: Aug 8, 2014
  • Latest release: Aug 10, 2014
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: antongorodezkiy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /799 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
This plugin's installer ran successfully

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

Analyzing server-side resources used by Wordpress AM/PM Plugin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0042.13 ▲4.20
Dashboard /wp-admin3.31 ▲0.0044.20 ▼6.03
Posts /wp-admin/edit.php3.36 ▲0.0046.18 ▼3.74
Add New Post /wp-admin/post-new.php5.90 ▲0.0182.97 ▼10.02
Media Library /wp-admin/upload.php3.23 ▼0.0031.78 ▲2.53

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Wordpress AM/PM Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲7213.58 ▼1.012.07 ▲0.0643.90 ▼1.09
Dashboard /wp-admin2,210 ▲195.86 ▲0.9798.08 ▼1.6839.54 ▼2.33
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0435.23 ▼8.6633.77 ▼0.94
Add New Post /wp-admin/post-new.php1,518 ▼1023.15 ▲4.80623.76 ▼21.1858.25 ▲4.32
Media Library /wp-admin/upload.php1,392 ▲14.28 ▲0.0795.52 ▼2.1339.51 ▼1.49

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The SRP test was a success

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === wp-ampm === )
You can look at the official readme.txt

wp-ampm/wp-ampm.php Passed 13 tests

The main PHP script in "Wordpress AM/PM Plugin" version 1.0.1 is automatically included on every request by WordPress
73 characters long description:
Plugin replaces the standard time controls (24h) with am/pm time controls

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected163 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1459126
PHP281323
CSS11010
Markdown1304

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.44
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%
Methods1
▷ Static methods1100.00%
▷ Public methods1100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.32MB with 0.15MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png330.06KB177.28KB▼ 46.29%