84% wp-amp-helper

Code Review | WP AMP Helper

WordPress plugin WP AMP Helper scored84%from 54 tests.

About plugin

  • Plugin page: wp-amp-helper
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.6
  • WordPress version: 6.3.1
  • First release: Oct 10, 2016
  • Latest release: Oct 14, 2016
  • Number of updates: 8
  • Update frequency: every 0.6 days
  • Top authors: apricoton (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /704 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.77ms] Passed 4 tests

This is a short check of server-side resources used by WP AMP Helper
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.91 ▲0.43
Dashboard /wp-admin3.32 ▲0.0147.27 ▼2.36
Posts /wp-admin/edit.php3.37 ▲0.0149.22 ▼0.20
Add New Post /wp-admin/post-new.php5.90 ▲0.0194.62 ▼16.96
Media Library /wp-admin/upload.php3.24 ▲0.0136.53 ▲6.24

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by WP AMP Helper
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.55 ▼1.094.66 ▲2.9042.73 ▲2.90
Dashboard /wp-admin2,206 ▲174.84 ▼0.13110.70 ▲3.5443.65 ▲0.85
Posts /wp-admin/edit.php2,089 ▼32.04 ▲0.0738.72 ▼3.4637.67 ▲0.27
Add New Post /wp-admin/post-new.php1,532 ▼118.28 ▼5.08602.54 ▼5.0680.12 ▲30.02
Media Library /wp-admin/upload.php1,388 ▼04.15 ▼0.0895.97 ▼5.2039.42 ▼3.97

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-amp-helper/wp-amp-helper.php:49

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === wp-amp-helper === )
The official readme.txt might help

wp-amp-helper/wp-amp-helper.php Passed 13 tests

"WP AMP Helper" version 1.0.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
22 characters long description:
Helper script for AMP.

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 plugin34 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP161134

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity3.67
▷ Minimum method complexity3.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods3100.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin