84% scaler-automated-advertising

Code Review | Scaler Automated Advertising

WordPress plugin Scaler Automated Advertising scored84%from 54 tests.

About plugin

  • Plugin page: scaler-automated-...
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.9
  • WordPress version: 6.3.1
  • First release: Mar 2, 2018
  • Latest release: Apr 20, 2018
  • Number of updates: 6
  • Update frequency: every 8.3 days
  • Top authors: scalerdev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /705 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.01MB] [CPU: ▼7.66ms] Passed 4 tests

Analyzing server-side resources used by Scaler Automated Advertising
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.12 ▼0.07
Dashboard /wp-admin3.31 ▼0.0445.91 ▼13.62
Posts /wp-admin/edit.php3.36 ▲0.0045.88 ▼0.25
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.32 ▼13.42
Media Library /wp-admin/upload.php3.23 ▲0.0034.90 ▼3.35

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Scaler Automated Advertising
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.74 ▲0.371.84 ▲0.3446.06 ▲7.63
Dashboard /wp-admin2,195 ▲155.52 ▼0.1082.29 ▼1.9537.04 ▼6.62
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0436.51 ▲2.4932.59 ▼0.06
Add New Post /wp-admin/post-new.php1,526 ▼723.25 ▲0.46674.52 ▲8.1356.24 ▲2.04
Media Library /wp-admin/upload.php1,394 ▼94.18 ▼0.0295.44 ▼4.2940.11 ▼2.58

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • 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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
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 plugin_dir_path() in wp-content/plugins/scaler-automated-advertising/scaler.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: Too many tags (16 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

scaler-automated-advertising/scaler.php 92% from 13 tests

The main file in "Scaler Automated Advertising" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("scaler-automated-advertising.php" instead of "scaler.php")

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
There were no executable files found in this plugin170 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP24620170

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.12
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%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
No PNG images were found in this plugin