10% amazing-ads-manager

Code Review | Amazing Ads Manager

WordPress plugin Amazing Ads Manager scored10%from 54 tests.

About plugin

  • Plugin page: amazing-ads-manager
  • Plugin version: 0.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.3
  • WordPress version: 6.3.1
  • First release: May 12, 2015
  • Latest release: Aug 19, 2015
  • Number of updates: 13
  • Update frequency: every 7.6 days
  • Top authors: mrdonrule (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /2,507 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Compile error in wp-content/plugins/amazing-ads-manager/amazing-ads-manager.php+614
    'continue' not in the 'loop' or 'switch' context

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

An overview of server-side resources used by Amazing Ads Manager
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.63 ▼1.99
Dashboard /wp-admin3.31 ▲0.0047.93 ▼1.14
Posts /wp-admin/edit.php3.36 ▲0.0049.58 ▼2.80
Add New Post /wp-admin/post-new.php5.89 ▲0.0098.31 ▼2.61
Media Library /wp-admin/upload.php3.23 ▲0.0035.01 ▼2.90

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Amazing Ads Manager
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.72 ▲0.431.71 ▲0.0144.07 ▼2.23
Dashboard /wp-admin2,198 ▲215.62 ▲0.0199.26 ▲10.4043.76 ▼4.08
Posts /wp-admin/edit.php2,103 ▲32.10 ▼0.0135.60 ▼6.8233.09 ▼7.95
Add New Post /wp-admin/post-new.php1,526 ▼523.42 ▲0.35646.20 ▼41.2454.70 ▲1.88
Media Library /wp-admin/upload.php1,400 ▼04.18 ▲0.0797.72 ▼12.7742.10 ▼4.98

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

Smoke tests 75% 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
Please fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/amazing-ads-manager/widgets/amads-widget.php:7
    • > PHP Fatal error
      'continue' not in the 'loop' or 'switch' context in wp-content/plugins/amazing-ads-manager/amazing-ads-manager.php on line 614

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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
Attributes that need to be fixed:
  • Screenshots: These screenshots need descriptions #2, #3, #4 in amazing-ads-manager/assets to your readme.txt
  • Tags: You are using too many tags: 12 tag instead of maximum 10
You can look at the official readme.txt

amazing-ads-manager/amazing-ads-manager.php 92% from 13 tests

The entry point to "Amazing Ads Manager" version 0.0.5 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 319 characters long)

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
Good job! No executable or dangerous file extensions detected1,034 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP212884781
CSS2225133
JavaScript21520120

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity22.00
▷ Minimum class complexity3.00
▷ Maximum class complexity58.00
Average method complexity3.40
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods35
▷ Static methods00.00%
▷ Public methods35100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.73MB with 0.30MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png165.24KB50.50KB▼ 69.44%
assets/images/icon.png1.06KB1.15KB0.00%
assets/images/v-logo_meta.png1.33KB1.34KB0.00%
screenshot-4.png317.37KB97.74KB▼ 69.20%
screenshot-1.png156.17KB49.41KB▼ 68.36%