90% limit-post-add-on

Code Review | Limit Post Add-On

WordPress plugin Limit Post Add-On scored90%from 54 tests.

About plugin

  • Plugin page: limit-post-add-on
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 1.5-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 14, 2010
  • Latest release: Feb 23, 2023
  • Number of updates: 19
  • Update frequency: every 268.5 days
  • Top authors: doc4 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

700+ active /31,236 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Limit Post Add-On
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.17 ▼0.20
Dashboard /wp-admin3.31 ▲0.0043.89 ▼7.91
Posts /wp-admin/edit.php3.36 ▲0.0044.48 ▼1.79
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.69 ▼18.83
Media Library /wp-admin/upload.php3.23 ▲0.0034.61 ▼0.69

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

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

Browser metrics Passed 4 tests

Limit Post Add-On: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.32 ▼0.961.77 ▼0.0043.75 ▼10.47
Dashboard /wp-admin2,209 ▲185.84 ▲0.9897.30 ▼20.9239.39 ▼8.01
Posts /wp-admin/edit.php2,086 ▼32.04 ▲0.0434.57 ▼4.0934.35 ▼0.63
Add New Post /wp-admin/post-new.php1,534 ▼823.20 ▲4.77679.19 ▲80.9573.91 ▲22.33
Media Library /wp-admin/upload.php1,388 ▼04.26 ▲0.0394.45 ▼4.3941.47 ▲0.22

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: copy, limit copy, post, limit text, limit post

limit-post-add-on/limit-post.php 92% from 13 tests

The main PHP script in "Limit Post Add-On" version 1.3 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("limit-post-add-on.php" instead of "limit-post.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin49 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP151249

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.19
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin