78% solutions-ad-manager

Code Review | Solutions Ad Manager

WordPress plugin Solutions Ad Manager scored78%from 54 tests.

About plugin

  • Plugin page: solutions-ad-manager
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.3.2
  • WordPress version: 6.3.1
  • First release: Jun 5, 2015
  • Latest release: Mar 7, 2020
  • Number of updates: 32
  • Update frequency: every 54.3 days
  • Top authors: solutionsbysteve (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,448 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.17MB] [CPU: ▼1.49ms] Passed 4 tests

Analyzing server-side resources used by Solutions Ad Manager
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1940.20 ▼1.24
Dashboard /wp-admin3.51 ▲0.2148.52 ▼2.11
Posts /wp-admin/edit.php3.56 ▲0.2046.75 ▼3.45
Add New Post /wp-admin/post-new.php6.03 ▲0.1497.23 ▲4.35
Media Library /wp-admin/upload.php3.37 ▲0.1434.69 ▲0.83
How To Use /wp-admin/edit.php?post_type=solutions-ad-manager&page=solutions-ad-manager-howto3.3830.95
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins3.4437.55
Groups /wp-admin/edit-tags.php?taxonomy=solutions-ad-group&post_type=solutions-ad-manager3.3633.36
Ads /wp-admin/edit.php?post_type=solutions-ad-manager3.4835.42
Options /wp-admin/edit.php?post_type=solutions-ad-manager&page=solutions-ad-manager-options3.3733.42

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 62 new files
Database: no new tables, 9 new options
New WordPress options
widget_sam_random_from_group_widget
widget_sam_specific_widget
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options
solutions_ad_database_version
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Solutions Ad Manager
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,877 ▲12013.62 ▼1.131.62 ▼0.4244.36 ▼1.34
Dashboard /wp-admin2,278 ▲905.90 ▲0.12106.91 ▼13.4045.42 ▲1.57
Posts /wp-admin/edit.php2,172 ▲802.06 ▲0.0141.92 ▲4.3241.16 ▲5.85
Add New Post /wp-admin/post-new.php1,575 ▲5423.50 ▲0.39656.78 ▼59.3754.01 ▼3.12
Media Library /wp-admin/upload.php1,471 ▲804.27 ▲0.0998.92 ▼2.8445.47 ▼1.86
How To Use /wp-admin/edit.php?post_type=solutions-ad-manager&page=solutions-ad-manager-howto9532.1928.7031.80
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins1,0002.0927.0134.41
Groups /wp-admin/edit-tags.php?taxonomy=solutions-ad-group&post_type=solutions-ad-manager1,3392.3327.9632.94
Ads /wp-admin/edit.php?post_type=solutions-ad-manager1,1641.9832.7034.65
Options /wp-admin/edit.php?post_type=solutions-ad-manager&page=solutions-ad-manager-options9342.2124.7133.26

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 9 options in the database
    • db_upgraded
    • widget_sam_random_from_group_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_sam_specific_widget
    • solutions_ad_database_version
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/solutions-ad-manager/public/partials/solutions-ad-manager-public-display.php
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/solutions-ad-manager/includes/class-solutions-ad-manager-widget-display-specific.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/solutions-ad-manager/includes/required-plugins/class-tgm-plugin-activation.php:2109
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/solutions-ad-manager/admin/partials/solutions-ad-manager-admin-display-howto.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/solutions-ad-manager/includes/class-solutions-ad-manager-widget.php:6
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/solutions-ad-manager/admin/partials/solutions-ad-manager-admin-display.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === solutions-ad-manager === )
The official readme.txt might help

solutions-ad-manager/solutions-ad-manager.php Passed 13 tests

The principal PHP file in "Solutions Ad Manager" v. 1.0.0 is loaded by WordPress automatically on each request
90 characters long description:
A simple ad manager that allows you to display pictures and YouTube videos in to a widget.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected7,671 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
PO File171,4491,9934,842
PHP166552,0642,800
CSS21023
JavaScript24546

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity27.88
▷ Minimum class complexity1.00
▷ Maximum class complexity206.00
Average method complexity3.56
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods168
▷ Static methods74.17%
▷ Public methods13982.74%
▷ Protected methods2313.69%
▷ Private methods63.57%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected