88% ads-inside-post-aipwp

Code Review | ADs Inside Post

WordPress plugin ADs Inside Post scored 88% from 54 tests.

About plugin

  • Plugin page: ads-inside-post-a...
  • Plugin version: 1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 2.3-4.1
  • WordPress version: 5.9.2
  • First release: Nov 20, 2013
  • Latest release: Mar 20, 2015
  • Number of updates: 15
  • Update frequency: every 32.4 days
  • Top authors: rajika4ever (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 5,761 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.35MB] [CPU: ▼312.43ms] Passed 4 tests

An overview of server-side resources used by ADs Inside Post
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.0663.80 ▲12.47
Dashboard /wp-admin3.24 ▼0.1722.40 ▼10.94
Posts /wp-admin/edit.php3.30 ▼0.3424.77 ▼10.93
Add New Post /wp-admin/post-new.php6.11 ▼0.8975.28 ▼1,226.28
Media Library /wp-admin/upload.php3.27 ▼0.0321.72 ▼1.58

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 6 new files
Database: 1 new table, no new options
New tables
wp_AIPWP_ADS

Browser metrics Passed 4 tests

An overview of browser requirements for ADs Inside Post
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,822 ▲7815.85 ▼0.176.69 ▲0.742.14 ▼0.34
Dashboard /wp-admin2,918 ▲646.12 ▼0.10122.90 ▼14.66158.95 ▼4.28
Posts /wp-admin/edit.php2,717 ▲233.23 ▼0.0163.91 ▼0.99142.74 ▲0.24
Add New Post /wp-admin/post-new.php1,778 ▲7017.64 ▼2.74407.31 ▼50.78156.53 ▲0.81
Media Library /wp-admin/upload.php1,723 ▲255.52 ▼0.00144.27 ▲3.07191.72 ▲8.25

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/ads-inside-post-aipwp/admin/admin.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/ads-inside-post-aipwp/index.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === ads-inside-post-aipwp === )
  • Screenshots: These screenshots do not have images: #1 (This shows ADs Inside Post in action), #2 (Shows Setting Options), #3 (Shows how to add the shortcode in posts/pages), #4 (Shows the Shortcode attrubute handling)
You can take inspiration from this readme.txt

ads-inside-post-aipwp/index.php 92% from 13 tests

The primary PHP file in "ADs Inside Post" version 1.7 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("ads-inside-post-aipwp.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin582 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP48535565
CSS19017

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin