84% front-page-category

Code Review | Front Page Category

WordPress plugin Front Page Category scored84%from 54 tests.

About plugin

  • Plugin page: front-page-category
  • Plugin version: 3.3.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2.0
  • WordPress version: 6.3.1
  • First release: Mar 31, 2010
  • Latest release: Mar 5, 2023
  • Number of updates: 34
  • Update frequency: every 139.0 days
  • Top authors: BinaryMoon (94.12%)jwall149 (8.82%)

Code review

54 tests

User reviews

26 reviews

Install metrics

8,000+ active /112,873 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.59ms] Passed 4 tests

An overview of server-side resources used by Front Page Category
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0035.43 ▼6.61
Dashboard /wp-admin3.31 ▲0.0145.33 ▼0.91
Posts /wp-admin/edit.php3.36 ▲0.0047.15 ▼3.77
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.35 ▲0.93
Media Library /wp-admin/upload.php3.23 ▲0.0035.05 ▲3.93

Server storage [IO: ▲0.01MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Front Page Category
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.73 ▼1.081.95 ▲0.0938.61 ▼4.01
Dashboard /wp-admin2,206 ▲154.83 ▼0.10104.20 ▼4.6939.82 ▼1.39
Posts /wp-admin/edit.php2,092 ▲32.00 ▼0.0140.02 ▼0.0134.76 ▼1.30
Add New Post /wp-admin/post-new.php1,514 ▼2817.48 ▼0.71670.47 ▲52.2544.25 ▼13.15
Media Library /wp-admin/upload.php1,388 ▼04.22 ▼0.0192.84 ▼4.0439.70 ▼0.72

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/front-page-category/front-page-category.php:72

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
6 plugin tags: category, page, post, customizer, front...

front-page-category/front-page-category.php Passed 13 tests

The main PHP file in "Front Page Category" ver. 3.3.5 adds more information about the plugin and also serves as the entry point for this plugin
53 characters long description:
Select the categories that display on the front page.

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
Success! There were no dangerous files found in this plugin210 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP293174178
JavaScript121025
CSS1107

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity10.50
▷ Minimum class complexity2.00
▷ Maximum class complexity19.00
Average method complexity3.71
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
There were not PNG files found in your plugin