84% aim3-shop2ad

Code Review | Shop2Ad Automator

WordPress plugin Shop2Ad Automator scored84%from 54 tests.

About plugin

  • Plugin page: aim3-shop2ad
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.0.2
  • WordPress version: 6.3.1
  • First release: Sep 30, 2022
  • Latest release: Oct 14, 2022
  • Number of updates: 6
  • Update frequency: every 2.3 days
  • Top authors: aim3media (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /811 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼0.33ms] Passed 4 tests

An overview of server-side resources used by Shop2Ad Automator
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0546.52 ▲2.68
Dashboard /wp-admin3.36 ▲0.0653.64 ▼0.15
Posts /wp-admin/edit.php3.41 ▲0.0552.26 ▼0.08
Add New Post /wp-admin/post-new.php5.94 ▲0.0594.03 ▲3.08
Media Library /wp-admin/upload.php3.28 ▲0.0534.61 ▼3.78

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Shop2Ad Automator
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.31 ▼0.041.94 ▼0.0143.39 ▼1.84
Dashboard /wp-admin2,195 ▲185.61 ▲0.0189.17 ▼8.7243.37 ▲1.15
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0337.81 ▲2.8833.82 ▼3.63
Add New Post /wp-admin/post-new.php1,526 ▼223.21 ▼0.02671.44 ▼14.1856.66 ▼1.98
Media Library /wp-admin/upload.php1,394 ▼64.28 ▲0.10100.40 ▼14.2244.78 ▼5.92

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
Please 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/aim3-shop2ad/shop2ad_automator.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
9 plugin tags: woocommerce, ads plugin, ads, marketing, aim3media...

aim3-shop2ad/shop2ad_automator.php 92% from 13 tests

The principal PHP file in "Shop2Ad Automator" v. 1.0.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("aim3-shop2ad.php" instead of "shop2ad_automator.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
Success! There were no dangerous files found in this plugin311 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3159189311

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods746.67%
▷ Protected methods00.00%
▷ Private methods853.33%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.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
There are no PNG files in this plugin