82% wp-adtentions

Code Review | WP Adtentions Light

WordPress plugin WP Adtentions Light scored 82% from 54 tests.

About plugin

  • Plugin page: wp-adtentions
  • Plugin version: 0.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.3
  • WordPress version: 5.9.2
  • First release: Aug 23, 2015
  • Latest release: Nov 15, 2015
  • Number of updates: 22
  • Update frequency: every 3.8 days
  • Top authors: artheme (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,133 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.56MB] [CPU: ▼330.34ms] Passed 4 tests

An overview of server-side resources used by WP Adtentions Light
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.09 ▲0.57126.81 ▲73.27
Dashboard /wp-admin3.96 ▲0.5538.11 ▲2.67
Posts /wp-admin/edit.php4.17 ▲0.5240.66 ▲1.45
Add New Post /wp-admin/post-new.php7.82 ▲0.84111.94 ▼1,323.05
Media Library /wp-admin/upload.php3.92 ▲0.6229.12 ▼2.43
Clicks /wp-admin/edit.php?post_type=wp_adtentions&page=adt-tracker_page3.8543.13
Helps /wp-admin/edit.php?post_type=wp_adtentions&page=adt-help_page3.7848.24
Create Adtention /wp-admin/post-new.php?post_type=wp_adtentions4.0942.22
All Adtentions /wp-admin/edit.php?post_type=wp_adtentions3.9430.72

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 65 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by WP Adtentions Light
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,838 ▲11616.18 ▲0.476.00 ▲0.482.52 ▼0.20
Dashboard /wp-admin2,941 ▲836.00 ▼0.12120.86 ▼16.60170.74 ▲8.33
Posts /wp-admin/edit.php2,735 ▲503.12 ▼0.1166.72 ▲3.84153.01 ▲10.19
Add New Post /wp-admin/post-new.php1,693 ▲3217.54 ▲1.50417.07 ▼5.73190.83 ▲11.35
Media Library /wp-admin/upload.php1,750 ▲555.46 ▼0.15126.85 ▼16.51225.65 ▲36.21
Clicks /wp-admin/edit.php?post_type=wp_adtentions&page=adt-tracker_page1,0282.3663.89112.10
Helps /wp-admin/edit.php?post_type=wp_adtentions&page=adt-help_page1,0692.3856.84115.72
Create Adtention /wp-admin/post-new.php?post_type=wp_adtentions4,62811.59281.68298.60
All Adtentions /wp-admin/edit.php?post_type=wp_adtentions1,5153.8576.66190.26

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
This plugin's uninstaller ran successfully

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/post-new.php?post_type=wp_adtentions
    • > Notice in wp-content/plugins/wp-adtentions/wpadtentions.php+41
    Undefined variable: post_type

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
Please fix the following items
  • 25× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-adtentions/include/display/adtshowshortcode.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-adtentions/include/adtenqscriptstyle.php:8
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-adtentions/include/required_files.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-adtentions/include/save/adtsaveanimationwa.php:6
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-adtentions/include/required_files.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-adtentions/include/adds/help.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-adtentions/include/controls/adtdisplaycontrol.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-adtentions/include/cookies.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wp-adtentions/include/adds/tracker.php:4
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/wp-adtentions/include/required_files.php on line 2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=wp_adtentions
    • > Network (severe)
    wp-content/plugins/wp-adtentions/css/admin/preview.css?ver=5.9.2 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=wp_adtentions
    • > Javascript (severe) in unknown
    /wp-content/plugins/wp-adtentions/js/admin/jquery.hashchange.min.js?ver=1.0.0 8:686 Uncaught TypeError: Cannot read properties of undefined (reading 'msie')
    • > GET request to /wp-admin/post-new.php?post_type=wp_adtentions
    • > Network (severe)
    wp-content/plugins/wp-adtentions/css/admin/images/ui-bg_glass_35_dddddd_1x400.png - 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

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
Please fix the following attributes:
  • Tags: There are too many tags (24 tag instead of maximum 10)
You can look at the official readme.txt

wp-adtentions/wpadtentions.php 85% from 13 tests

The primary PHP file in "WP Adtentions Light" version 0.1.2 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-adtentions.php" instead of "wpadtentions.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 450 characters long)

Code Analysis 97% from 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
Success! There were no dangerous files found in this plugin5,024 lines of code in 47 files:
LanguageFilesBlank linesComment linesLines of code
PHP233511762,580
JavaScript12237931,255
CSS121821151,189

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
These items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 173)
Cyclomatic complexity
Average complexity per logical line of code0.92
Average class complexity39.42
▷ Minimum class complexity1.00
▷ Maximum class complexity208.00
Average method complexity12.23
▷ Minimum method complexity1.00
▷ Maximum method complexity173.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
Methods65
▷ Static methods00.00%
▷ Public methods6193.85%
▷ Protected methods00.00%
▷ Private methods46.15%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
12 PNG files occupy 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/paper-plane.png3.24KB0.64KB▼ 80.24%
css/admin/img/off.png3.67KB1.40KB▼ 61.79%
img/close.png3.50KB0.52KB▼ 85.20%
css/admin/images/dd.png2.93KB0.43KB▼ 85.29%
img/go-pro.png28.33KB11.89KB▼ 58.04%