68% ads-management

Code Review | Ads Management

WordPress plugin Ads Management scored68%from 54 tests.

About plugin

  • Plugin page: ads-management
  • Plugin version: 0.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.2.2
  • WordPress version: 6.3.1
  • First release: Mar 13, 2015
  • Latest release: May 14, 2015
  • Number of updates: 9
  • Update frequency: every 6.9 days
  • Top authors: shahalom (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,487 total downloads

Benchmarks

Plugin footprint 65% 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.22MB] [CPU: ▼2.38ms] Passed 4 tests

A check of server-side resources used by Ads Management
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2145.33 ▲1.34
Dashboard /wp-admin3.52 ▲0.2250.60 ▼1.41
Posts /wp-admin/edit.php3.63 ▲0.2850.72 ▲0.98
Add New Post /wp-admin/post-new.php6.12 ▲0.2387.81 ▼10.44
Media Library /wp-admin/upload.php3.44 ▲0.2138.86 ▲1.40
Instructions /wp-admin/admin.php?page=msbd_adsmp_instructions3.4134.56
Management Advertisement /wp-admin/admin.php?page=msbd_adsmp_manage3.4536.28
Settings /wp-admin/admin.php?page=msbd_adsmp_settings3.4132.73
Add New /wp-admin/admin.php?page=msbd_adsmp_add_edit3.4037.56

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 17 new files
Database: 2 new tables, 8 new options
New tables
wp_msbd_adsmp
wp_msbd_adsmp_adv_to_categories
New WordPress options
theysaidso_admin_options
widget_recent-posts
category_children
msbd_adsmp_options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Ads Management
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲6414.29 ▼0.081.57 ▼0.0242.98 ▲2.79
Dashboard /wp-admin2,217 ▲375.57 ▼0.0987.54 ▼0.5078.84 ▲33.12
Posts /wp-admin/edit.php2,134 ▲341.99 ▼0.0536.11 ▼0.3037.52 ▲0.42
Add New Post /wp-admin/post-new.php1,708 ▲18021.88 ▼1.15652.02 ▼8.8753.59 ▲0.36
Media Library /wp-admin/upload.php1,437 ▲374.17 ▲0.00100.90 ▼8.8573.86 ▲28.13
Instructions /wp-admin/admin.php?page=msbd_adsmp_instructions1,0355.15151.7057.27
Management Advertisement /wp-admin/admin.php?page=msbd_adsmp_manage1,1324.65142.7933.41
Settings /wp-admin/admin.php?page=msbd_adsmp_settings1,0884.72112.2032.22
Add New /wp-admin/admin.php?page=msbd_adsmp_add_edit1,2704.8893.1634.53

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure failed, leaving 2 tables in the database
    • wp_msbd_adsmp
    • wp_msbd_adsmp_adv_to_categories
  • Zombie WordPress options detected upon uninstall: 8 options
    • msbd_adsmp_options
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • category_children

Smoke tests 50% from 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 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
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/ads-management/libs/msbd-adsm-admin-tables.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/ads-management/ads-management.php:13
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/ads-management/libs/msbd-adsm-admin-tables.php on line 7
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/ads-management/libs/msbd-adsm-admin-tables.php on line 7
    • > PHP Fatal error
      Uncaught Error: Class 'MsbdCrud' not found in wp-content/plugins/ads-management/libs/msbd-adsm-db.php:6

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=msbd_adsmp_add_edit
    • > Other (severe) in unknown
    chrome-error://chromewebdata/ - Refused to display 'https://developers.google.com/' in a frame because it set 'X-Frame-Options' to 'sameorigin'.

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: ads shortcode, manage advertisements, affiliate advertising, google adsense, manage ads...

ads-management/ads-management.php 92% from 13 tests

Analyzing the main PHP file in "Ads Management" version 0.2.2
Please make the necessary changes and fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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 plugin1,588 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP85721671,460
CSS213099
JavaScript217929

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity25.38
▷ Minimum class complexity4.00
▷ Maximum class complexity40.00
Average method complexity3.38
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods82
▷ Static methods89.76%
▷ Public methods82100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/msbd_logo.png28.81KB9.10KB▼ 68.41%
images/msbd_favicon_32.png1.12KB1.20KB0.00%
images/msbd_favicon_16.png0.61KB0.63KB0.00%