74% limit-posts

Code Review | Limit Posts

WordPress plugin Limit Posts scored74%from 54 tests.

About plugin

  • Plugin page: limit-posts
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.3
  • WordPress version: 6.3.1
  • First release: Jul 8, 2015
  • Latest release: Nov 5, 2015
  • Number of updates: 30
  • Update frequency: every 4.0 days
  • Top authors: PluginCentral (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

200+ active /8,005 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼7.57ms] Passed 4 tests

This is a short check of server-side resources used by Limit Posts
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0640.98 ▼4.33
Dashboard /wp-admin3.36 ▲0.0649.63 ▼8.58
Posts /wp-admin/edit.php3.48 ▲0.1248.14 ▼5.16
Add New Post /wp-admin/post-new.php5.97 ▲0.0891.13 ▼12.20
Media Library /wp-admin/upload.php3.29 ▲0.0640.96 ▲1.67
Limit Posts /wp-admin/options-general.php?page=limit_posts_menu3.2735.38

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Limit Posts
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲1114.72 ▲0.361.96 ▲0.1339.63 ▼0.34
Dashboard /wp-admin2,203 ▲265.66 ▲0.0291.92 ▼9.3440.05 ▼2.92
Posts /wp-admin/edit.php2,108 ▲82.00 ▲0.0136.23 ▼0.5834.25 ▼1.09
Add New Post /wp-admin/post-new.php1,533 ▲723.04 ▼0.74666.58 ▲4.2661.99 ▲7.84
Media Library /wp-admin/upload.php1,408 ▲54.18 ▼0.09111.47 ▲11.6447.93 ▲3.54
Limit Posts /wp-admin/options-general.php?page=limit_posts_menu1,0912.0927.2325.86

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Please fix the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/limit-posts/options-page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function LimitPosts\\plugin_basename() in wp-content/plugins/limit-posts/limit-posts.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Donate link: Invalid URI ("www.limitposts.com/donate/")
  • Plugin Name: Please specify the plugin name on the first line ( === limit-posts === )
You can look at the official readme.txt

limit-posts/limit-posts.php Passed 13 tests

The entry point to "Limit Posts" version 1.0.6 is a PHP file that has certain tags in its header comment area
104 characters long description:
A plugin to allow administrators to limit the number of posts a user can publish in a given time period.

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Please fix the following items
  • You should never include executable (binary) or otherwise dangerous files in your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/limit-posts/sassbuild.bat
576 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP29650402
JavaScript13515127
Sass11029
CSS21617
DOS Batch1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity47.00
▷ Minimum class complexity47.00
▷ Maximum class complexity47.00
Average method complexity2.84
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods25
▷ Static methods00.00%
▷ Public methods832.00%
▷ Protected methods00.00%
▷ Private methods1768.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin