84% ads-into-post

Code Review | Ads Into Post

WordPress plugin Ads Into Post scored 84% from 54 tests.

About plugin

  • Plugin page: ads-into-post
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Nov 9, 2017
  • Latest release: Nov 24, 2017
  • Number of updates: 22
  • Update frequency: every 0.7 days
  • Top authors: eaxjp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 878 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

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

A check of server-side resources used by Ads Into Post
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0853.01 ▲5.02
Dashboard /wp-admin3.36 ▲0.0664.00 ▼16.74
Posts /wp-admin/edit.php3.42 ▲0.0659.48 ▼7.46
Add New Post /wp-admin/post-new.php5.95 ▲0.06115.54 ▼9.28
Media Library /wp-admin/upload.php3.29 ▲0.0648.94 ▲6.65
Ads Into Post /wp-admin/options-general.php?page=aip3_menu3.2544.41

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Ads Into Post: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▼713.34 ▲0.185.47 ▲2.1051.79 ▼9.87
Dashboard /wp-admin2,204 ▼25.85 ▲0.96128.46 ▼5.7247.59 ▼6.24
Posts /wp-admin/edit.php2,093 ▲11.99 ▲0.0042.27 ▼7.5942.26 ▲1.75
Add New Post /wp-admin/post-new.php1,540 ▲723.48 ▲0.35723.29 ▼102.7151.08 ▼53.05
Media Library /wp-admin/upload.php1,392 ▲14.24 ▲0.02124.83 ▼15.6358.52 ▲3.61
Ads Into Post /wp-admin/options-general.php?page=aip3_menu8462.0235.3833.84

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ads-into-post/ads-into-post.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Requires at least: Invalid version format
Please take inspiration from this readme.txt

ads-into-post/ads-into-post.php 92% from 13 tests

The main PHP script in "Ads Into Post" version 1.1 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin359 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15234359

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
PNG images were not found in this plugin