10% jomniaga-ad-manager

Code Review | Ashadee Ad Manager

WordPress plugin Ashadee Ad Manager scored10%from 54 tests.

About plugin

  • Plugin page: jomniaga-ad-manager
  • Plugin version: 1.0.12
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.3.1
  • WordPress version: 6.3.1
  • First release: Feb 26, 2012
  • Latest release: Jun 24, 2014
  • Number of updates: 24
  • Update frequency: every 35.5 days
  • Top authors: incomattic (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /5,263 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/jomniaga-ad-manager/jomniaga.php+14
    Methods with the same name as their class will not be constructors in a future version of PHP; WPJomniaga has a deprecated constructor

Server metrics [RAM: ▼1.90MB] [CPU: ▼57.73ms] Passed 4 tests

This is a short check of server-side resources used by Ashadee Ad Manager
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.36 ▼1.375.56 ▼40.08
Dashboard /wp-admin2.38 ▼1.186.30 ▼49.48
Posts /wp-admin/edit.php2.38 ▼1.308.60 ▼43.86
Add New Post /wp-admin/post-new.php2.38 ▼3.767.19 ▼97.48
Media Library /wp-admin/upload.php2.38 ▼1.118.34 ▼31.86
Ashadee /wp-admin/options-general.php?page=ashadee2.385.98

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 23 new options
New WordPress options
wpjomniaga_keyword_limit_percomment
wpjomniaga_convert_single_post
widget_recent-posts
widget_recent-comments
wpjomniaga_link_no_follow
wpjomniaga_related_title
wpjomniaga_keyword_limit_perpage
wpjomniaga_tracking_code
wpjomniaga_related_show
wpjomniaga_convert_comment
...

Browser metrics Passed 4 tests

Checking browser requirements for Ashadee Ad Manager
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲4914.38 ▲0.011.97 ▲0.1141.12 ▼4.55
Dashboard /wp-admin2,195 ▲185.69 ▲0.14102.47 ▼6.1344.14 ▼2.10
Posts /wp-admin/edit.php2,106 ▲62.02 ▲0.0037.81 ▲1.4634.56 ▼1.63
Add New Post /wp-admin/post-new.php1,545 ▲1923.56 ▲5.82656.06 ▼57.2351.04 ▼5.05
Media Library /wp-admin/upload.php1,409 ▲94.20 ▼0.01101.30 ▼20.0344.34 ▼3.75
Ashadee /wp-admin/options-general.php?page=ashadee1,1502.0724.6229.25

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/jomniaga-ad-manager/jomniaga.php+14
    Methods with the same name as their class will not be constructors in a future version of PHP; WPJomniaga has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 23 options
    • wpjomniaga_related_title
    • wpjomniaga_convert_limit_perpage
    • wpjomniaga_keyword_limit_perpage
    • wpjomniaga_tracking_code
    • wpjomniaga_username
    • wpjomniaga_convert_archive
    • widget_recent-posts
    • wpjomniaga_category
    • wpjomniaga_link_new_window
    • wpjomniaga_convert_comment
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=ashadee
    • > Deprecated in wp-content/plugins/jomniaga-ad-manager/jomniaga.php+14
    Methods with the same name as their class will not be constructors in a future version of PHP; WPJomniaga has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=ashadee
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=ashadee
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jomniaga-js handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=ashadee
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/jomniaga-ad-manager/jomniaga.php:26

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=ashadee
    • > Network (severe)
    wp-content/plugins/jomniaga/js/script.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 (Enter your Ashadee username, add tracking code, and select a category or choose Any Category by default), #2 (Display related affiliate offers at the bottom of each post, based on keywords used in that post), #3 (Choose where and how keywords should be automatically converted to your affiliate links)
The official readme.txt is a good inspiration

jomniaga-ad-manager/jomniaga.php 85% from 13 tests

The entry point to "Ashadee Ad Manager" version 1.0.12 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("jomniaga-ad-manager.php" instead of "jomniaga.php")
  • Description: The description should be shorter than 140 characters (currently 240 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected625 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP19538572
JavaScript112052
JSON1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity129.00
▷ Minimum class complexity129.00
▷ Maximum class complexity129.00
Average method complexity10.14
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin