78% wp-spreadplugin

Code Review | WP-Spreadplugin

WordPress plugin WP-Spreadplugin scored78%from 54 tests.

About plugin

  • Plugin page: wp-spreadplugin
  • Plugin version: 4.8.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.2
  • WordPress version: 6.3.1
  • First release: Mar 8, 2013
  • Latest release: Jul 31, 2023
  • Number of updates: 1,115
  • Update frequency: every 3.4 days
  • Top authors: pr3ss-play (100%)

Code review

54 tests

User reviews

69 reviews

Install metrics

1,000+ active /177,786 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼9.93ms] Passed 4 tests

A check of server-side resources used by WP-Spreadplugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1134.40 ▼5.70
Dashboard /wp-admin3.39 ▲0.0544.12 ▼17.69
Posts /wp-admin/edit.php3.51 ▲0.1545.85 ▼1.35
Add New Post /wp-admin/post-new.php5.97 ▲0.0982.95 ▼14.98
Media Library /wp-admin/upload.php3.32 ▲0.0944.98 ▲11.48
Spreadplugin /wp-admin/options-general.php?page=splg_options3.5837.05

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 59 new files
Database: no new tables, 8 new options
New WordPress options
widget_spreadplugin_coupon_widget
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_spreadplugin_basket_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for WP-Spreadplugin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,910 ▲14913.82 ▼0.5417.37 ▲15.5838.38 ▼8.62
Dashboard /wp-admin2,213 ▲365.72 ▼0.1684.99 ▼1.7937.22 ▼5.09
Posts /wp-admin/edit.php2,123 ▲232.24 ▲0.2942.19 ▲2.2436.79 ▼3.43
Add New Post /wp-admin/post-new.php1,550 ▲2223.23 ▼0.10693.92 ▲15.2937.44 ▼23.91
Media Library /wp-admin/upload.php1,424 ▲214.51 ▲0.26104.71 ▲2.8346.16 ▼0.14
Spreadplugin /wp-admin/options-general.php?page=splg_options2,1452.5446.3533.43

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
The following items require your attention
  • The uninstall procedure has failed, leaving 8 options in the database
    • db_upgraded
    • widget_spreadplugin_coupon_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_spreadplugin_basket_widget
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=splg_options
    • > Notice in wp-content/plugins/wp-spreadplugin/options.php+71
    Undefined index: shop_api
    • > GET request to /wp-admin/options-general.php?page=splg_options
    • > Notice in wp-content/plugins/wp-spreadplugin/options.php+77
    Undefined index: shop_secret

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_user_logged_in() in wp-content/plugins/wp-spreadplugin/options.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-spreadplugin/spreadplugin.php:98

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
10 plugin tags: integration, online store, plugin, store, shirt...

wp-spreadplugin/spreadplugin.php 77% from 13 tests

The primary PHP file in "WP-Spreadplugin" version 4.8.9 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Description: Keep the plugin description shorter than 140 characters (currently 149 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-spreadplugin.php" instead of "spreadplugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin10,343 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PO File142,2733,1284,372
PHP35515633,015
CSS4261351,755
JavaScript87598612
SVG103534
JSON30055

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity188.33
▷ Minimum class complexity5.00
▷ Maximum class complexity550.00
Average method complexity8.07
▷ Minimum method complexity1.00
▷ Maximum method complexity67.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods72
▷ Static methods1723.61%
▷ Public methods5069.44%
▷ Protected methods2230.56%
▷ Private methods00.00%
Functions10
▷ Named functions220.00%
▷ Anonymous functions880.00%
Constants1
▷ Global constants1100.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
There were not PNG files found in your plugin