84% lsx-customizer

Code Review | LSX Customizer

WordPress plugin LSX Customizer scored84%from 54 tests.

About plugin

  • Plugin page: lsx-customizer
  • Plugin version: 1.5.4
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.3
  • WordPress version: 6.3.1
  • First release: Mar 29, 2018
  • Latest release: Aug 18, 2023
  • Number of updates: 42
  • Update frequency: every 46.9 days
  • Top authors: feedmymedia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /4,485 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.49MB] [CPU: ▼0.38ms] Passed 4 tests

This is a short check of server-side resources used by LSX Customizer
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.28 ▲0.5569.67 ▲22.82
Dashboard /wp-admin4.07 ▲0.5058.78 ▲2.68
Posts /wp-admin/edit.php4.12 ▲0.4454.88 ▼0.18
Add New Post /wp-admin/post-new.php6.66 ▲0.51101.10 ▼10.62
Media Library /wp-admin/upload.php3.99 ▲0.5045.01 ▲6.59

Server storage [IO: ▲7.01MB] [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: 215 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for LSX Customizer
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,880 ▲11913.49 ▼0.948.75 ▲7.0440.26 ▼3.34
Dashboard /wp-admin2,198 ▲185.65 ▼0.0489.98 ▼1.3640.75 ▼2.42
Posts /wp-admin/edit.php2,100 ▲31.99 ▼0.0641.12 ▲1.2734.52 ▼0.19
Add New Post /wp-admin/post-new.php1,526 ▼1417.88 ▼5.35629.56 ▼59.0758.93 ▲7.69
Media Library /wp-admin/upload.php1,400 ▼04.24 ▲0.02105.32 ▼3.8847.27 ▲1.64

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
The following issues need your attention
  • 32× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'LSX_Customizer_Colour' not found in wp-content/plugins/lsx-customizer/classes/class-lsx-customizer-colour-footer.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'LSX_Customizer_Colour' not found in wp-content/plugins/lsx-customizer/classes/class-lsx-customizer-colour-body.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/lsx-customizer/classes/class-lsx-customizer-colour-control.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'LSX_Customizer' not found in wp-content/plugins/lsx-customizer/classes/class-lsx-customizer-core.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'LSX_Customizer' not found in wp-content/plugins/lsx-customizer/classes/class-lsx-customizer-admin.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Leafo\\ScssPhp\\Formatter' not found in wp-content/plugins/lsx-customizer/vendor/leafo/scssphp/src/Formatter/Nested.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'LSX_Customizer_Colour' not found in wp-content/plugins/lsx-customizer/classes/class-lsx-customizer-colour-button-tertiary.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Leafo\\ScssPhp\\Formatter' not found in wp-content/plugins/lsx-customizer/vendor/leafo/scssphp/src/Formatter/Debug.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Leafo\\ScssPhp\\Formatter' not found in wp-content/plugins/lsx-customizer/vendor/leafo/scssphp/src/Formatter/Crunched.php:22
    • > PHP Fatal error
      require_once(): Failed opening required 'LSX_CUSTOMIZER_PATHclasses/class-lsx-customizer-admin.php' (include_path='.:/usr/share/php') in wp-content/plugins/lsx-customizer/classes/class-lsx-customizer.php on line 29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: colours, lsx, woocommerce, customizer, layout

lsx-customizer/lsx-customizer.php Passed 13 tests

The main file in "LSX Customizer" v. 1.5.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
110 characters long description:
The LSX Customizer extension gives you complete control over the appearance of your LSX-powered WordPress site

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin28,600 lines of code in 175 files:
LanguageFilesBlank linesComment linesLines of code
Sass741,67687714,444
PHP623,2675,00111,510
JavaScript10542571,604
CSS1426413357
PO File1137210287
YAML450185
Markdown2880158
XML113944
SVG6006
JSON1005

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
Please fix the following
  • Method cyclomatic complexity should be reduced to less than 100 (currently 132)
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity37.85
▷ Minimum class complexity1.00
▷ Maximum class complexity961.00
Average method complexity4.56
▷ Minimum method complexity1.00
▷ Maximum method complexity132.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes52
▷ Abstract classes23.85%
▷ Concrete classes5096.15%
▷ Final classes00.00%
Methods527
▷ Static methods81.52%
▷ Public methods24245.92%
▷ Protected methods27752.56%
▷ Private methods81.52%
Functions92
▷ Named functions7884.78%
▷ Anonymous functions1415.22%
Constants66
▷ Global constants46.06%
▷ Class constants6293.94%
▷ Public constants62100.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
12 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/admin/2cr.png0.18KB0.20KB0.00%
assets/images/admin/header-hamburger.png10.86KB6.14KB▼ 43.48%
assets/images/admin/header-central.png0.40KB0.14KB▼ 64.06%
assets/images/admin/3cm.png0.17KB0.19KB0.00%
assets/images/admin/3cl.png0.19KB0.23KB0.00%