74% ad-itt

Code Review | Ad Itt

WordPress plugin Ad Itt scored74%from 54 tests.

About plugin

  • Plugin page: ad-itt
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.0
  • WordPress version: 6.3.1
  • First release: Jan 22, 2013
  • Latest release: Oct 28, 2014
  • Number of updates: 9
  • Update frequency: every 71.6 days
  • Top authors: MMDeveloper (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,579 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.91MB] [CPU: ▼35.94ms] Passed 4 tests

A check of server-side resources used by Ad Itt
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0436.20 ▼6.90
Dashboard /wp-admin3.04 ▼0.2724.87 ▼28.82
Posts /wp-admin/edit.php3.04 ▼0.3223.90 ▼21.61
Add New Post /wp-admin/post-new.php3.04 ▼2.8524.63 ▼78.08
Media Library /wp-admin/upload.php3.04 ▼0.1921.72 ▼15.25

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 25 new options
New WordPress options
widget_recent-posts
top_ad_img
widget_theysaidso_widget
bottom_ad_position
enable_top_ad_link
css_content_wrapper_selector
db_upgraded
right_ad_link
left_ad_link
bottom_ad_img
...

Browser metrics Passed 4 tests

Ad Itt: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,920 ▲17413.98 ▼0.316.17 ▲4.4540.32 ▼2.98
Dashboard /wp-admin2,240 ▲495.90 ▼0.00105.43 ▼11.2942.60 ▼3.00
Posts /wp-admin/edit.php2,126 ▲372.03 ▲0.0342.89 ▲6.9637.19 ▲0.63
Add New Post /wp-admin/post-new.php1,572 ▲5818.57 ▲1.08610.58 ▼58.4855.80 ▼2.17
Media Library /wp-admin/upload.php1,422 ▲314.25 ▲0.0097.80 ▲1.1443.51 ▼0.63

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/ad-itt/ad-itt.php+30
    Undefined index: filter_image_name
  • This plugin does not fully uninstall, leaving 25 options in the database
    • top_ad_img
    • enable_bottom_ad_link
    • theysaidso_admin_options
    • right_ad_position
    • css_content_wrapper_selector
    • widget_recent-comments
    • right_ad_img
    • top_ad_link
    • bottom_ad_position
    • right_ad_link
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ad-itt/ad-itt.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

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
Please fix the following attributes:
  • Donate link: Invalid URI found ("")
The official readme.txt is a good inspiration

ad-itt/ad-itt.php Passed 13 tests

The main PHP file in "Ad Itt" ver. 2.0 adds more information about the plugin and also serves as the entry point for this plugin
36 characters long description:
Adds advertisements to your website.

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 detected2,297 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP21841081,412
JavaScript2113220855
CSS10030

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity207.00
▷ Minimum class complexity207.00
▷ Maximum class complexity207.00
Average method complexity6.02
▷ Minimum method complexity1.00
▷ Maximum method complexity46.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods41
▷ Static methods00.00%
▷ Public methods41100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin