84% bainternet-posts-creation-limits

Code Review | Bainternet Posts Creation Limits

WordPress plugin Bainternet Posts Creation Limits scored84%from 54 tests.

About plugin

  • Plugin page: bainternet-posts-...
  • Plugin version: 3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.7.0
  • WordPress version: 6.3.1
  • First release: Jan 14, 2011
  • Latest release: Dec 11, 2016
  • Number of updates: 27
  • Update frequency: every 79.9 days
  • Top authors: bainternet (100%)

Code review

54 tests

User reviews

21 reviews

Install metrics

700+ active /19,294 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.07MB] [CPU: ▼3.35ms] Passed 4 tests

This is a short check of server-side resources used by Bainternet Posts Creation Limits
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.1038.55 ▼2.14
Dashboard /wp-admin3.40 ▲0.1047.68 ▼2.21
Posts /wp-admin/edit.php3.34 ▼0.0233.56 ▼11.33
Add New Post /wp-admin/post-new.php5.98 ▲0.10106.60 ▲13.37
Media Library /wp-admin/upload.php3.33 ▲0.1037.69 ▲2.29
Posts Creation limits /wp-admin/options-general.php?page=bainternet-posts-creation-limits/bapl.php3.2931.04

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
bapl
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Bainternet Posts Creation Limits
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.60 ▼0.815.83 ▲3.9944.84 ▼7.36
Dashboard /wp-admin2,210 ▲194.87 ▼0.00100.39 ▼5.7042.49 ▲0.08
Posts /wp-admin/edit.php2,093 ▲41.97 ▼0.0535.76 ▼1.0632.18 ▼4.34
Add New Post /wp-admin/post-new.php1,545 ▲3118.01 ▲0.49578.52 ▼121.6755.59 ▼11.95
Media Library /wp-admin/upload.php1,392 ▲74.19 ▼0.0395.03 ▼16.5942.86 ▼3.67
Posts Creation limits /wp-admin/options-general.php?page=bainternet-posts-creation-limits/bapl.php1,1522.2024.7125.13

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
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • bapl
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bainternet-posts-creation-limits/bapl.php:64

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 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
8 plugin tags: post limit, limits, limit pages, limit user, cpt limits...

bainternet-posts-creation-limits/bapl.php 92% from 13 tests

"Bainternet Posts Creation Limits" version 3.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("bainternet-posts-creation-limits.php" instead of "bapl.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin576 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16793576

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity97.00
▷ Minimum class complexity97.00
▷ Maximum class complexity97.00
Average method complexity5.80
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin