10% shopp-clockwork

Code Review | Shopp + Clockwork

WordPress plugin Shopp + Clockwork scored10%from 54 tests.

About plugin

  • Plugin page: shopp-clockwork
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.9.2
  • WordPress version: 6.3.1
  • First release: Dec 28, 2012
  • Latest release: Aug 25, 2014
  • Number of updates: 7
  • Update frequency: every 93.0 days
  • Top authors: lorenzocaum (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /5,378 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/shopp-clockwork/shopp-clockwork.php+47
    Accessing static property Shopp_Clockwork::$apikey as non static

Server metrics [RAM: ▼1.78MB] [CPU: ▼51.16ms] Passed 4 tests

An overview of server-side resources used by Shopp + Clockwork
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.22 ▼1.245.95 ▼31.46
Dashboard /wp-admin2.24 ▼1.1111.84 ▼45.75
Posts /wp-admin/edit.php2.24 ▼1.127.19 ▼39.75
Add New Post /wp-admin/post-new.php2.24 ▼3.656.72 ▼87.69
Media Library /wp-admin/upload.php2.24 ▼0.997.73 ▼28.76

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Shopp + Clockwork
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.10 ▼0.251.71 ▲0.0544.47 ▲4.46
Dashboard /wp-admin2,200 ▲235.61 ▼0.0196.38 ▲7.9443.07 ▲1.83
Posts /wp-admin/edit.php2,102 ▲22.02 ▲0.0333.09 ▼4.8643.86 ▲10.36
Add New Post /wp-admin/post-new.php1,528 ▲223.56 ▼0.06691.16 ▲5.5555.07 ▲4.14
Media Library /wp-admin/upload.php1,399 ▼14.22 ▲0.01100.62 ▼12.9145.11 ▼6.95

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/shopp-clockwork/shopp-clockwork.php+47
    Accessing static property Shopp_Clockwork::$apikey as non static
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% 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)
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/shopp-clockwork/shopp-clockwork.php:38

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 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
  • Screenshots: Please add images for these screenshots: #1 (The Shopp + Clockwork WordPress admin page.), #2 (An additional view of the Shopp + Clockwork WordPress admin page.), #3 (Shopp + Clockwork iPhone 4S demo.)
The official readme.txt is a good inspiration

shopp-clockwork/shopp-clockwork.php Passed 13 tests

"Shopp + Clockwork" version 1.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
133 characters long description:
Merchants who have a WordPress ecommerce store are notified of new orders via a text message to their mobile phone through Clockwork.

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
No dangerous file extensions were detected697 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP3132282684
CSS13013

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity31.33
▷ Minimum class complexity1.00
▷ Maximum class complexity81.00
Average method complexity5.33
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods21
▷ Static methods29.52%
▷ Public methods1676.19%
▷ Protected methods523.81%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants00.00%
▷ Class constants6100.00%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.47MB with 0.33MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png110.21KB33.74KB▼ 69.39%
screenshot-1.png202.81KB63.31KB▼ 68.78%
screenshot-2.png165.27KB47.78KB▼ 71.09%