94% post-read-limited-by-category

Code Review | Post Read Limited by Specified Category

WordPress plugin Post Read Limited by Specified Category scored 94% from 53 tests.

About plugin

  • Plugin page: post-read-limited...
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-4.7.5
  • WordPress version: 5.8.1
  • First release: May 17, 2017
  • Latest release: May 29, 2017
  • Number of updates: 9
  • Update frequency: every 1.3 days
  • Top authors: johnlei (100%)

Code review

53 tests

User reviews

1 review

Install metrics

10+ active / 2,249 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▼0.17MB] [CPU: ▼274.89ms] Passed 4 tests

Server-side resources used by Post Read Limited by Specified Category
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.82 ▲0.1035.64 ▲11.85
Dashboard /wp-admin3.08 ▲0.0343.23 ▲0.82
Posts /wp-admin/edit.php3.13 ▲0.0342.58 ▲0.02
Add New Post /wp-admin/post-new.php4.67 ▼0.7558.34 ▼1,093.44
Media Library /wp-admin/upload.php3.02 ▲0.0233.70 ▼6.96
PostReadLimit /wp-admin/options-general.php?page=functions2.9731.32

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Post Read Limited by Specified Category: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,678 ▲7215.90 ▲0.348.70 ▲0.4047.06 ▼9.45
Dashboard /wp-admin2,935 ▲795.91 ▲0.07146.97 ▲12.69112.36 ▲11.23
Posts /wp-admin/edit.php2,711 ▲52.69 ▲0.0171.28 ▲1.1895.78 ▲0.35
Add New Post /wp-admin/post-new.php1,580 ▲9717.10 ▼1.41372.44 ▼6.22104.74 ▼22.11
Media Library /wp-admin/upload.php1,777 ▲54.99 ▼0.01149.83 ▼35.18126.33 ▲3.47
PostReadLimit /wp-admin/options-general.php?page=functions1,0312.0959.5069.38

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=functions
    • > Warning in wp-content/plugins/post-read-limited-by-category/postreadlimitedbc.php+79
    in_array() expects parameter 2 to be array, bool given

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Donate link: Invalid URI ("")
The official readme.txt is a good inspiration

post-read-limited-by-category/postreadlimitedbc.php 92% from 13 tests

The principal PHP file in "Post Read Limited by Specified Category" v. 1.2.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("post-read-limited-by-category.php" instead of "postreadlimitedbc.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin109 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1546109

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin