67% sedox-performance-vehicle-catalogue

Code Review | Sedox Performance Vehicle Catalogue

WordPress plugin Sedox Performance Vehicle Catalogue scored67%from 54 tests.

About plugin

  • Plugin page: sedox-performance...
  • Plugin version: 1.4.1-build.4...
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.3.2
  • WordPress version: 6.3.1
  • First release: Mar 4, 2020
  • Latest release: Nov 13, 2023
  • Number of updates: 19
  • Update frequency: every 71.4 days
  • Top authors: sedoxperformance (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,033 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.66MB] [CPU: ▼2.96ms] Passed 4 tests

An overview of server-side resources used by Sedox Performance Vehicle Catalogue
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.10 ▲0.6332.01 ▼8.13
Dashboard /wp-admin3.98 ▲0.6752.67 ▲1.30
Posts /wp-admin/edit.php4.09 ▲0.7353.46 ▲8.11
Add New Post /wp-admin/post-new.php6.56 ▲0.6786.17 ▼8.38
Media Library /wp-admin/upload.php3.90 ▲0.6740.33 ▲3.39

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Sedox Performance Vehicle Catalogue
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,908 ▲14614.62 ▼0.0951.37 ▲49.6441.75 ▼3.32
Dashboard /wp-admin2,208 ▲375.63 ▼0.0097.26 ▼4.5442.62 ▼4.69
Posts /wp-admin/edit.php2,119 ▲161.95 ▼0.0633.56 ▼2.8130.76 ▼7.61
Add New Post /wp-admin/post-new.php1,539 ▲1323.05 ▼0.08694.05 ▼5.9059.43 ▲4.14
Media Library /wp-admin/upload.php1,416 ▲134.17 ▲0.0495.52 ▼11.7340.46 ▼7.76

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • 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)
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/sedox-performance-vehicle-catalogue/sedox-catalogue.php
  • 328× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'SedoxVDb\\Base\\BaseController' not found in wp-content/plugins/sedox-performance-vehicle-catalogue/src/Api/Callbacks/ManagerCallbacks.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/sedox-performance-vehicle-catalogue/vendor/coenjacobs/mozart/tests/Console/Commands/ComposeTest.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'SedoxWPCatalogue\\Dependencies\\Tuningfiles\\Model\\ModelInterface' not found in wp-content/plugins/sedox-performance-vehicle-catalogue/vendor_mozart/Tuningfiles/vendor/sedox/tuningfiles-php-sdk/Model/Error404Error.php:42
    • > PHP Fatal error
      Uncaught Error: Interface 'CoenJacobs\\Mozart\\Replace\\Replacer' not found in wp-content/plugins/sedox-performance-vehicle-catalogue/vendor/coenjacobs/mozart/src/Replace/BaseReplacer.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/sedox-performance-vehicle-catalogue/vendor_mozart/Tuningfiles/vendor/sedox/tuningfiles-php-sdk/test/Api/VehicleDatabaseApiTest.php:42
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Finder\\Comparator\\Comparator' not found in wp-content/plugins/sedox-performance-vehicle-catalogue/vendor/symfony/finder/Comparator/NumberComparator.php:35
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\Flysystem\\ReadInterface' not found in wp-content/plugins/sedox-performance-vehicle-catalogue/vendor/league/flysystem/src/AdapterInterface.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Console\\Formatter\\OutputFormatterStyleInterface' not found in wp-content/plugins/sedox-performance-vehicle-catalogue/vendor/symfony/console/Formatter/OutputFormatterStyle.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'CoenJacobs\\Mozart\\Composer\\Autoload\\Autoloader' not found in wp-content/plugins/sedox-performance-vehicle-catalogue/vendor/coenjacobs/mozart/src/Composer/Autoload/Classmap.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'SedoxWPCatalogue\\Dependencies\\Tuningfiles\\Model\\ModelInterface' not found in wp-content/plugins/sedox-performance-vehicle-catalogue/vendor_mozart/Tuningfiles/vendor/sedox/tuningfiles-php-sdk/Model/Error401.php:42

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 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
These attributes need to be fixed:
  • Screenshots: Screenshot #3 (Frontend customization) image required
  • Contributors: Plugin contributors not specified
The official readme.txt might help

sedox-performance-vehicle-catalogue/sedox-catalogue.php 77% from 13 tests

"Sedox Performance Vehicle Catalogue" version 1.4.1-build.4...'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:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Version: Use only periods and digits for the version number (ex. "1.0.3" instead of "1.4.1-build.4...")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("sedox-performance-vehicle-catalogue.php" instead of "sedox-catalogue.php")

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Almost there! Just fix the following issues
  • For security reasons, never distribute binary or executable files with your plugin
    • .exe - Executable in Windows
      • wp-content/plugins/sedox-performance-vehicle-catalogue/vendor/symfony/console/Resources/bin/hiddeninput.exe
    • .bat - Batch File in Windows
      • wp-content/plugins/sedox-performance-vehicle-catalogue/vendor/bin/mozart.bat
83,845 lines of code in 707 files:
LanguageFilesBlank linesComment linesLines of code
PHP58413,00338,53777,581
Markdown881,08403,334
JSON21002,736
Bourne Again Shell1101460
YAML23143
XML31142
Bourne Shell114838
DOS Batch1005
CSS3003
JavaScript3083

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Please fix the following
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 179)
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity13.67
▷ Minimum class complexity1.00
▷ Maximum class complexity593.00
Average method complexity2.28
▷ Minimum method complexity1.00
▷ Maximum method complexity179.00
Code structure
Namespaces82
Interfaces53
Traits16
Classes462
▷ Abstract classes183.90%
▷ Concrete classes44496.10%
▷ Final classes5512.39%
Methods5,133
▷ Static methods83516.27%
▷ Public methods4,64590.49%
▷ Protected methods1803.51%
▷ Private methods3086.00%
Functions543
▷ Named functions20838.31%
▷ Anonymous functions33561.69%
Constants451
▷ Global constants9420.84%
▷ Class constants35779.16%
▷ Public constants31086.83%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
9 PNG files occupy 0.37MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/4419fd4d332f11791ffc.png6.09KB4.82KB▼ 20.86%
assets/images/08ed75601da4e9a8d2d4.png4.62KB3.62KB▼ 21.61%
assets/images/b5005355626c545cdeec.png3.04KB2.70KB▼ 11.09%
assets/images/logo.png6.70KB3.18KB▼ 52.52%
assets/images/1dc5578b8363fd7610fe.png5.94KB4.26KB▼ 28.25%