74% simple-catalogue

Code Review | Simple catalogue

WordPress plugin Simple catalogue scored74%from 54 tests.

About plugin

  • Plugin page: simple-catalogue
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.3.1
  • WordPress version: 6.3.1
  • First release: Aug 4, 2015
  • Latest release: Nov 2, 2015
  • Number of updates: 18
  • Update frequency: every 5.0 days
  • Top authors: fb-creations (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,635 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.66ms] Passed 4 tests

This is a short check of server-side resources used by Simple catalogue
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0234.87 ▼1.08
Dashboard /wp-admin3.33 ▲0.0345.63 ▼0.65
Posts /wp-admin/edit.php3.38 ▲0.0347.39 ▼3.31
Add New Post /wp-admin/post-new.php5.91 ▲0.0388.02 ▼4.84
Media Library /wp-admin/upload.php3.25 ▲0.0335.82 ▼1.39
Add Categories /wp-admin/admin.php?page=categories3.2231.77
Update /wp-admin/admin.php?page=edit-simple-catalogue3.2230.93
Add new /wp-admin/admin.php?page=add_new_item3.2230.11
Simple Catalogue /wp-admin/options-general.php?page=sc_settings3.2230.86

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 18 new files
Database: 2 new tables, 6 new options
New tables
wp_sc_post_type
wp_sc_category
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simple catalogue
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7013.23 ▼0.941.65 ▲0.0141.91 ▲0.62
Dashboard /wp-admin2,222 ▲314.87 ▼0.03109.48 ▲4.6438.44 ▼0.84
Posts /wp-admin/edit.php2,105 ▲132.06 ▲0.0641.47 ▲0.3537.36 ▼0.26
Add New Post /wp-admin/post-new.php1,546 ▲2523.07 ▼0.47650.83 ▼10.1851.20 ▼13.75
Media Library /wp-admin/upload.php1,407 ▲224.22 ▼0.0493.77 ▼19.6040.47 ▼6.46
Add Categories /wp-admin/admin.php?page=categories8182.0323.1624.71
Update /wp-admin/admin.php?page=edit-simple-catalogue7692.0225.5030.64
Add new /wp-admin/admin.php?page=add_new_item8452.1521.9627.88
Simple Catalogue /wp-admin/options-general.php?page=sc_settings8502.0330.0231.87

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin cannot be uninstalled
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'sc_drop_options' not found or invalid function name
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% 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
Almost there! Just fix the following items
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_user_can() in wp-content/plugins/simple-catalogue/simple-catalogue.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_user_can() in wp-content/plugins/simple-catalogue/sc-post-type.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_user_can() in wp-content/plugins/simple-catalogue/edit-catalogue.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_user_can() in wp-content/plugins/simple-catalogue/validation.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_user_can() in wp-content/plugins/simple-catalogue/sc-taxonomie.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
Please take inspiration from this readme.txt

simple-catalogue/simple-catalogue.php 92% from 13 tests

The primary PHP file in "Simple catalogue" version 1.0.2 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 142 characters long)

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
Everything looks great! No dangerous files found in this plugin1,343 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PO File5312364787
PHP71773556

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity15.00
▷ Minimum class complexity5.00
▷ Maximum class complexity34.00
Average method complexity3.47
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods17
▷ Static methods317.65%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin