84% autoshop

Code Review | AutoShop

WordPress plugin AutoShop scored84%from 54 tests.

About plugin

  • Plugin page: autoshop
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.4.1
  • WordPress version: 6.3.1
  • First release: Jan 15, 2016
  • Latest release: Mar 2, 2016
  • Number of updates: 18
  • Update frequency: every 2.7 days
  • Top authors: thanhitvl (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /776 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.03MB] [CPU: ▼8.79ms] Passed 4 tests

Server-side resources used by AutoShop
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0343.94 ▼5.51
Dashboard /wp-admin3.35 ▼0.0048.37 ▼16.34
Posts /wp-admin/edit.php3.46 ▲0.1050.92 ▼2.26
Add New Post /wp-admin/post-new.php5.93 ▲0.0497.00 ▼11.03
Media Library /wp-admin/upload.php3.27 ▲0.0440.87 ▲1.96

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

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

Browser metrics Passed 4 tests

A check of browser resources used by AutoShop
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲1814.42 ▲0.181.86 ▼0.0942.95 ▼5.25
Dashboard /wp-admin2,198 ▲215.56 ▼0.1291.97 ▼2.0473.12 ▲23.68
Posts /wp-admin/edit.php2,121 ▲211.98 ▼0.0039.22 ▲2.9335.30 ▼0.82
Add New Post /wp-admin/post-new.php1,693 ▲16722.17 ▼0.85845.65 ▲157.8460.56 ▲3.27
Media Library /wp-admin/upload.php1,412 ▲184.22 ▼0.01100.20 ▼14.1382.17 ▲37.96

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% 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
Please fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/autoshop/views/config.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/autoshop/autoshop.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: Screenshot #1 (AutoShop settings page.) image missing
The official readme.txt is a good inspiration

autoshop/autoshop.php Passed 13 tests

"AutoShop" version 1.0.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
91 characters long description:
A simple module to allow users to communicate with their Autoshop Server and mobile device.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin179 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP546134179

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity2.00
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants375.00%
▷ Class constants125.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.14MB with 0.09MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png139.85KB36.78KB▼ 73.70%
icon.png1.17KB0.51KB▼ 56.76%