79% ian-ads

Code Review | IAN Ads

WordPress plugin IAN Ads scored79%from 54 tests.

About plugin

  • Plugin page: ian-ads
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-5.0.0
  • WordPress version: 6.3.1
  • First release: Sep 26, 2017
  • Latest release: Dec 10, 2018
  • Number of updates: 16
  • Update frequency: every 28.8 days
  • Top authors: boncom (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /905 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.06MB] [CPU: ▼5.62ms] Passed 4 tests

A check of server-side resources used by IAN Ads
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0643.79 ▲5.69
Dashboard /wp-admin3.38 ▲0.0445.11 ▼10.89
Posts /wp-admin/edit.php3.49 ▲0.1447.83 ▲1.18
Add New Post /wp-admin/post-new.php5.96 ▲0.0888.46 ▼15.73
Media Library /wp-admin/upload.php3.30 ▲0.0835.93 ▲2.95
IAN Ad Options /wp-admin/options-general.php?page=ian_options3.2831.68

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for IAN Ads
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.85 ▲0.471.60 ▲0.0238.23 ▼2.47
Dashboard /wp-admin2,210 ▲315.85 ▲0.90108.22 ▼21.2041.97 ▼15.10
Posts /wp-admin/edit.php2,093 ▲71.99 ▲0.0340.34 ▲4.3234.80 ▼1.19
Add New Post /wp-admin/post-new.php1,536 ▼823.39 ▲4.92649.27 ▲11.5056.93 ▼2.87
Media Library /wp-admin/upload.php1,392 ▲44.30 ▲0.0595.17 ▼1.4940.80 ▼3.84
IAN Ad Options /wp-admin/options-general.php?page=ian_options1,1312.2823.8931.06

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however 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 non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/ian-ads/ian-ads.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function site_url() in wp-content/plugins/ian-ads/explanation.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/ian-ads/widget.class.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: ad, ian, ads, advertising

ian-ads/ian-ads.php Passed 13 tests

"IAN Ads" version 1.0.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
69 characters long description:
Add Ads from the Interactive Ad Network (IAN) to your WordPress site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin368 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP563101366
CSS1001
JavaScript1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity14.67
▷ Minimum class complexity6.00
▷ Maximum class complexity28.00
Average method complexity2.86
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods22
▷ Static methods522.73%
▷ Public methods2195.45%
▷ Protected methods00.00%
▷ Private methods14.55%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.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
4 PNG files occupy 0.05MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png22.39KB13.33KB▼ 40.45%
assets/screenshot-2.png21.25KB13.40KB▼ 36.91%
assets/icon-256x256.png2.03KB2.18KB0.00%
assets/icon-128x128.png1.98KB2.03KB0.00%