83% fv-top-level-cats

Code Review | FV Top Level Categories

WordPress plugin FV Top Level Categories scored83%from 54 tests.

About plugin

  • Plugin page: fv-top-level-cats
  • Plugin version: 1.9.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2.1-6.3
  • WordPress version: 6.3.1
  • First release: Mar 18, 2011
  • Latest release: Aug 22, 2023
  • Number of updates: 47
  • Update frequency: every 96.9 days
  • Top authors: FolioVision (100%)

Code review

54 tests

User reviews

23 reviews

Install metrics

20,000+ active /223,307 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

An overview of server-side resources used by FV Top Level Categories
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0333.96 ▼7.05
Dashboard /wp-admin3.33 ▲0.0343.91 ▼3.24
Posts /wp-admin/edit.php3.38 ▲0.0245.09 ▼7.18
Add New Post /wp-admin/post-new.php5.91 ▲0.0286.15 ▼10.00
Media Library /wp-admin/upload.php3.25 ▲0.0234.65 ▲2.43
FV Top Level Categories /wp-admin/options-general.php?page=fv_top_level_cats3.2230.62

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for FV Top Level Categories
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.56 ▼1.231.67 ▼0.2840.98 ▼0.86
Dashboard /wp-admin2,210 ▲225.85 ▲0.99107.79 ▼6.6342.61 ▼3.66
Posts /wp-admin/edit.php2,093 ▲42.01 ▼0.0039.74 ▼1.4134.98 ▼2.06
Add New Post /wp-admin/post-new.php1,537 ▲223.30 ▼0.04676.19 ▼20.0356.07 ▲1.01
Media Library /wp-admin/upload.php1,392 ▲14.21 ▲0.0296.28 ▼2.7240.30 ▼3.98
FV Top Level Categories /wp-admin/options-general.php?page=fv_top_level_cats7672.0326.0226.12

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

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
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/fv-top-level-cats/top-level-cats.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
2 plugin tags: categories, permalink

fv-top-level-cats/top-level-cats.php 77% from 13 tests

The primary PHP file in "FV Top Level Categories" version 1.9.1 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("fv-top-level-cats.php" instead of "top-level-cats.php")
  • Description: The description should be shorter than 140 characters (currently 159 characters long)
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected468 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP111230335
PO File32222120
Markdown19013

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity22.00
▷ Minimum class complexity22.00
▷ Maximum class complexity22.00
Average method complexity3.62
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods450.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.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
PNG images were not found in this plugin