79% adplus

Code Review | AdPlus

WordPress plugin AdPlus scored79%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: 6.3.1
  • 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 /1,168 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼2.14ms] Passed 4 tests

Analyzing server-side resources used by AdPlus
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0941.49 ▲4.75
Dashboard /wp-admin3.40 ▲0.1043.86 ▼1.86
Posts /wp-admin/edit.php3.51 ▲0.1545.41 ▲2.72
Add New Post /wp-admin/post-new.php5.99 ▲0.1180.50 ▼7.88
Media Library /wp-admin/upload.php3.32 ▲0.0933.78 ▼1.55
AdPlus.io /wp-admin/options-general.php?page=adplus3.2932.06

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for AdPlus
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,920 ▲17413.58 ▼0.597.73 ▲6.0541.60 ▲1.26
Dashboard /wp-admin2,214 ▲405.83 ▲0.9196.35 ▼22.1938.61 ▼2.96
Posts /wp-admin/edit.php2,097 ▲82.01 ▼0.0139.31 ▲5.0334.29 ▲0.03
Add New Post /wp-admin/post-new.php1,525 ▼823.26 ▼0.04672.91 ▼36.2756.13 ▼3.45
Media Library /wp-admin/upload.php1,399 ▲114.24 ▼0.08101.51 ▼1.3840.57 ▼4.86
AdPlus.io /wp-admin/options-general.php?page=adplus8012.0624.9625.73

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/adplus/public/partials/adplus-public-display.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > 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 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: adplus, monetize

adplus/adplus.php Passed 13 tests

Analyzing the main PHP file in "AdPlus" version 1.0.4
63 characters long description:
Плагин интеграции с сервисом AdPlus.io

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
There were no executable files found in this plugin442 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP14149568421
JavaScript25011
CSS22410

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued 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

PNG files should be compressed to save space and 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%