90% primary-cat

Code Review | Primary Cat

WordPress plugin Primary Cat scored90%from 54 tests.

About plugin

  • Plugin page: primary-cat
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Jan 5, 2021
  • Latest release: Aug 19, 2023
  • Number of updates: 6
  • Update frequency: every 159.3 days
  • Top authors: bhadaway (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /497 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼7.94ms] Passed 4 tests

Server-side resources used by Primary Cat
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.43 ▼2.86
Dashboard /wp-admin3.33 ▼0.0243.47 ▼13.35
Posts /wp-admin/edit.php3.38 ▲0.0244.74 ▼6.30
Add New Post /wp-admin/post-new.php5.91 ▲0.0287.98 ▼9.23
Media Library /wp-admin/upload.php3.25 ▲0.0233.72 ▲0.81

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Primary Cat
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.22 ▼1.151.59 ▼0.3441.27 ▲1.74
Dashboard /wp-admin2,206 ▲184.83 ▼0.1096.65 ▼5.4039.23 ▼6.62
Posts /wp-admin/edit.php2,092 ▲32.01 ▲0.0039.35 ▼1.5636.21 ▼1.22
Add New Post /wp-admin/post-new.php1,542 ▲2818.55 ▲1.00586.58 ▼99.3165.02 ▲11.39
Media Library /wp-admin/upload.php1,385 ▼64.19 ▼0.0092.79 ▼11.6841.15 ▼5.51

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
7 plugin tags: category, breadcrumbs, category slug, primary category, schema...

primary-cat/primary-cat.php 92% from 13 tests

This is the main PHP file of "Primary Cat" version 0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, 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 programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin98 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP161798

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.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
No PNG files were detected