68% cat-pass

Code Review | Cat-Pass

WordPress plugin Cat-Pass scored68%from 54 tests.

About plugin

  • Plugin page: cat-pass
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.4.2
  • WordPress version: 6.3.1
  • First release: Nov 19, 2012
  • Latest release: Nov 19, 2012
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: mores (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /2,972 total downloads

Benchmarks

Plugin footprint 65% 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: ▼1.23MB] [CPU: ▼36.77ms] Passed 4 tests

Analyzing server-side resources used by Cat-Pass
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.75 ▼0.7215.76 ▼20.87
Dashboard /wp-admin2.79 ▼0.5216.57 ▼29.68
Posts /wp-admin/edit.php2.79 ▼0.5716.40 ▼27.47
Add New Post /wp-admin/post-new.php2.79 ▼3.1016.40 ▼69.07
Media Library /wp-admin/upload.php2.79 ▼0.4515.51 ▼17.72

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

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

Browser metrics Passed 4 tests

Cat-Pass: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.20 ▼1.204.63 ▲2.8743.76 ▲3.74
Dashboard /wp-admin2,210 ▲215.88 ▲0.94107.85 ▼0.4043.99 ▲2.31
Posts /wp-admin/edit.php2,093 ▲71.99 ▼0.0036.82 ▲0.4733.26 ▼0.98
Add New Post /wp-admin/post-new.php1,517 ▼1623.47 ▲0.21668.61 ▲11.9465.11 ▲12.01
Media Library /wp-admin/upload.php1,395 ▲74.25 ▲0.0493.70 ▼9.6141.51 ▼1.43
Cat-Pass Settings /wp-admin/cat-pass.php260.440.0713.44

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/cat-pass/cat-pass.php+16
    Undefined index: pass
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cat-pass/cat-pass.php:24

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
    • > GET request to /wp-admin/cat-pass.php
    • > Network (severe)
    wp-admin/cat-pass.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #1 (A post that's protected by Cat-Pass), #2 (The same post once it's been unlocked with a password), #3 (The options screen)
You can look at the official readme.txt

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

"Cat-Pass" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 154 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected106 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11910106

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.34
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%
Functions4
▷ Named functions4100.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