83% elegant-catalogs-for-woocommerce

Code Review | Elegant Catalogs

WordPress plugin Elegant Catalogs scored83%from 54 tests.

About plugin

  • Plugin page: elegant-catalogs-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jan 19, 2021
  • Latest release: Jan 19, 2021
  • Number of updates: 4
  • Update frequency: every 0.5 days
  • Top authors: elegantmodules (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /596 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
Install script ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼7.47ms] Passed 4 tests

Analyzing server-side resources used by Elegant Catalogs
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0943.94 ▼3.15
Dashboard /wp-admin3.40 ▲0.0949.01 ▼3.32
Posts /wp-admin/edit.php3.51 ▲0.1547.94 ▼6.35
Add New Post /wp-admin/post-new.php5.98 ▲0.0985.04 ▼17.07
Media Library /wp-admin/upload.php3.32 ▲0.0938.65 ▲4.41
Elegant Catalogs /wp-admin/admin.php?page=elegant-catalogs3.2933.24

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Elegant Catalogs
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.73 ▲0.181.98 ▲0.2046.24 ▼0.42
Dashboard /wp-admin2,192 ▲215.51 ▼0.08102.38 ▲13.1342.51 ▲0.68
Posts /wp-admin/edit.php2,100 ▲31.94 ▼0.0335.87 ▼0.8434.33 ▼3.00
Add New Post /wp-admin/post-new.php1,526 ▼323.68 ▲0.47680.77 ▲2.4651.56 ▼9.04
Media Library /wp-admin/upload.php1,394 ▼64.17 ▼0.0296.63 ▼19.2542.89 ▼7.05
Elegant Catalogs /wp-admin/admin.php?page=elegant-catalogs8292.0022.1326.96

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

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)
Everything seems fine, however 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
Almost there! Just fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/elegant-catalogs-for-woocommerce/templates/store-details.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ElegantModules\\ElegantCatalogs\\ElegantCatalogs' not found in wp-content/plugins/elegant-catalogs-for-woocommerce/templates/settings-page.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/elegant-catalogs-for-woocommerce/templates/connect-store.php:3

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 90% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: pdf, catalogs, woocommerce, catalogues, catalog

elegant-catalogs-for-woocommerce/elegant-catalogs.php 77% from 13 tests

The main PHP script in "Elegant Catalogs" version 1.0.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("elegant-catalogs-for-woocommerce.php" instead of "elegant-catalogs.php")
  • Domain Path: The domain path points to a folder that does not exist ("/languages/")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 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
There were no executable files found in this plugin505 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP782160301
CSS1270175
JavaScript11028
SVG1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity10.33
▷ Minimum class complexity4.00
▷ Maximum class complexity14.00
Average method complexity2.56
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods18
▷ Static methods316.67%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin