89% adplus

Code Review | AdPlus

WordPress plugin AdPlus scored 89% from 54 tests.

About plugin

  • Plugin page: adplus
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.7.2
  • WordPress version: 5.9.2
  • First release: Feb 27, 2017
  • Latest release: Mar 15, 2017
  • Number of updates: 18
  • Update frequency: every 0.8 days
  • Top authors: vashkatsi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 934 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼293.36ms] Passed 4 tests

Analyzing server-side resources used by AdPlus
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.1554.25 ▲3.07
Dashboard /wp-admin3.51 ▲0.1034.63 ▲0.93
Posts /wp-admin/edit.php3.74 ▲0.0936.95 ▼0.74
Add New Post /wp-admin/post-new.php6.98 ▲0.0094.50 ▼1,171.73
Media Library /wp-admin/upload.php3.39 ▲0.0923.28 ▼1.90
AdPlus.io /wp-admin/options-general.php?page=adplus3.3629.74

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 24 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for AdPlus
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,918 ▲16416.63 ▲0.9711.72 ▲5.702.73 ▼0.22
Dashboard /wp-admin2,901 ▲406.24 ▲0.09116.58 ▼17.68158.93 ▼7.14
Posts /wp-admin/edit.php2,700 ▲93.24 ▲0.0165.90 ▲2.38142.62 ▲2.69
Add New Post /wp-admin/post-new.php1,668 ▼8417.08 ▼4.01424.66 ▼71.54155.87 ▲2.84
Media Library /wp-admin/upload.php1,708 ▲105.52 ▲0.02144.48 ▲4.62187.70 ▼7.95
AdPlus.io /wp-admin/options-general.php?page=adplus1,0262.6256.09125.34

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/adplus/public/partials/adplus-public-display.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/adplus/admin/partials/adplus-admin-display.php:17

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
2 plugin tags: adplus, monetize

adplus/adplus.php Passed 13 tests

The main file in "AdPlus" v. 1.0.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
63 characters long description:
Плагин интеграции с сервисом AdPlus.io

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin442 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP14149568421
JavaScript25011
CSS22410

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity3.00
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.42
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods37
▷ Static methods718.92%
▷ Public methods3081.08%
▷ Protected methods00.00%
▷ Private methods718.92%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
1 PNG file occupies 0.16MB with 0.10MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png158.89KB55.60KB▼ 65.01%