68% spareparts-live

Code Review | spareparts.live

WordPress plugin spareparts.live scored68%from 54 tests.

About plugin

  • Plugin page: spareparts-live
  • Plugin version: 1.0.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3
  • WordPress version: 6.3.1
  • First release: Mar 14, 2021
  • Latest release: Aug 11, 2023
  • Number of updates: 17
  • Update frequency: every 51.9 days
  • Top authors: sparepartsone (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /759 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.92MB] [CPU: ▼35.26ms] Passed 4 tests

Analyzing server-side resources used by spareparts.live
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0436.20 ▼6.76
Dashboard /wp-admin3.02 ▼0.2824.59 ▼25.28
Posts /wp-admin/edit.php3.02 ▼0.3426.38 ▼19.77
Add New Post /wp-admin/post-new.php3.02 ▼2.8724.48 ▼81.42
Media Library /wp-admin/upload.php3.02 ▼0.2122.22 ▼14.58
spareparts.live /wp-admin/options-general.php?page=sparepartslive_plugin3.0225.36

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for spareparts.live
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.21 ▼1.454.73 ▲2.8542.37 ▼2.06
Dashboard /wp-admin2,213 ▲284.88 ▼1.03111.62 ▲10.1542.81 ▲0.76
Posts /wp-admin/edit.php2,093 ▲42.06 ▲0.0540.89 ▲5.0436.88 ▲6.82
Add New Post /wp-admin/post-new.php1,526 ▲723.68 ▲0.39678.04 ▼0.7972.07 ▲12.08
Media Library /wp-admin/upload.php1,392 ▲44.24 ▲0.0597.38 ▼9.0443.66 ▼1.43
spareparts.live /wp-admin/options-general.php?page=sparepartslive_plugin7952.0524.6229.85

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=sparepartslive_plugin
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

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× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/spareparts-live/visiblepage.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
7 plugin tags: spareparts, ecommerce parts catalog solution, spare parts, epc, ecatalogue...

spareparts-live/spareparts_live.php 85% from 13 tests

"spareparts.live" version 1.0.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("spareparts-live.php" instead of "spareparts_live.php")
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

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
Good job! No executable or dangerous file extensions detected90 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3479090

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity1.80
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
PNG images were not found in this plugin