10% sf-category-menu

Code Review | SF Category Menu

WordPress plugin SF Category Menu scored10%from 54 tests.

About plugin

  • Plugin page: sf-category-menu
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.9.5
  • WordPress version: 6.3.1
  • First release: Feb 12, 2015
  • Latest release: May 16, 2018
  • Number of updates: 19
  • Update frequency: every 62.7 days
  • Top authors: Studiofreya (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /2,713 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/sf-category-menu/sf-category-menu.php+103
    Methods with the same name as their class will not be constructors in a future version of PHP; SFCategoryMenuWidget has a deprecated constructor

Server metrics [RAM: ▼1.86MB] [CPU: ▼56.78ms] Passed 4 tests

Analyzing server-side resources used by SF Category Menu
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.13 ▼1.344.88 ▼38.95
Dashboard /wp-admin2.15 ▼1.167.32 ▼47.67
Posts /wp-admin/edit.php2.15 ▼1.215.86 ▼51.86
Add New Post /wp-admin/post-new.php2.15 ▼3.746.53 ▼88.65
Media Library /wp-admin/upload.php2.15 ▼1.086.31 ▼36.25

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 23 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_sfcategorymenuwidget

Browser metrics Passed 4 tests

Checking browser requirements for SF Category Menu
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,899 ▲13813.46 ▼0.898.51 ▲6.5146.46 ▲4.05
Dashboard /wp-admin2,195 ▲215.63 ▲0.0998.77 ▲4.8941.55 ▼4.83
Posts /wp-admin/edit.php2,097 ▼62.01 ▼0.0837.33 ▲0.2033.06 ▼5.60
Add New Post /wp-admin/post-new.php1,526 ▼023.16 ▲0.00696.06 ▼1.3850.58 ▼4.13
Media Library /wp-admin/upload.php1,397 ▼04.22 ▲0.04110.13 ▲2.7744.09 ▲0.41

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/sf-category-menu/sf-category-menu.php+103
    Methods with the same name as their class will not be constructors in a future version of PHP; SFCategoryMenuWidget has a deprecated constructor
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_sfcategorymenuwidget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/sf-category-menu/sf-category-menu.php:103

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
9 plugin tags: pages, posts, menu, treeview, list...

sf-category-menu/sf-category-menu.php Passed 13 tests

The main file in "SF Category Menu" v. 1.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
67 characters long description:
Easy treeview menu for WordPress categories, with catergory caching

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin286 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP16517268
PO File10015
JavaScript20242
CSS1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin