78% shopsite-plugin

Code Review | ShopSite

WordPress plugin ShopSite scored78%from 54 tests.

About plugin

  • Plugin page: shopsite-plugin
  • Plugin version: 1.5.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2.0-5.0.3
  • WordPress version: 6.3.1
  • First release: Mar 5, 2012
  • Latest release: Dec 24, 2019
  • Number of updates: 29
  • Update frequency: every 98.4 days
  • Top authors: ShopSite (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /3,890 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼7.17ms] Passed 4 tests

A check of server-side resources used by ShopSite
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.83 ▲0.0951.45 ▲0.19
Dashboard /wp-admin3.72 ▲0.0951.35 ▼17.93
Posts /wp-admin/edit.php3.77 ▲0.0949.00 ▲0.50
Add New Post /wp-admin/post-new.php6.24 ▲0.0988.17 ▼11.42
Media Library /wp-admin/upload.php3.58 ▲0.0937.78 ▲0.49
ShopSite /wp-admin/options-general.php?page=shopsite_menu3.5936.52

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 18 new options
New WordPress options
widget_recent-posts
ss_config_type
ss_config_dump
ss_clientid
ss_shopsite_url
ss_identifier
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
ss_media_url
...

Browser metrics Passed 4 tests

An overview of browser requirements for ShopSite
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,908 ▲14713.89 ▼0.5411.51 ▲9.6938.66 ▼4.67
Dashboard /wp-admin2,203 ▲235.60 ▼0.0288.35 ▲1.7938.79 ▼0.32
Posts /wp-admin/edit.php2,111 ▲142.01 ▼0.0036.07 ▼1.4035.58 ▲0.56
Add New Post /wp-admin/post-new.php1,536 ▲523.55 ▲0.53593.12 ▼107.8953.53 ▲1.70
Media Library /wp-admin/upload.php1,408 ▲114.20 ▲0.07101.42 ▼6.4446.15 ▼0.20
ShopSite /wp-admin/options-general.php?page=shopsite_menu8902.0723.2329.58

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

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 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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_uninstall_hook() in wp-content/plugins/shopsite-plugin/shopsite.php:39

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=shopsite_menu
    • > Javascript (severe) in unknown
    /wp-admin/options-general.php?page=shopsite_menu 141:16 Uncaught TypeError: $(...).live is not a function

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Plugin Name: Please specify the plugin name on the first line ( === shopsite-plugin === )
You can take inspiration from this readme.txt

shopsite-plugin/shopsite.php 92% from 13 tests

The principal PHP file in "ShopSite" v. 1.5.7 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("shopsite-plugin.php" instead of "shopsite.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin1,272 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP214865584
JavaScript511740440
CSS1523248

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
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%
Functions26
▷ Named functions26100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
2 compressed PNG files occupy 0.01MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
ss-20.png0.92KB1.01KB0.00%
ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%