84% meta-box-text-limiter

Code Review | Meta Box Text Limiter

WordPress plugin Meta Box Text Limiter scored84%from 54 tests.

About plugin

  • Plugin page: meta-box-text-lim...
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.6
  • WordPress version: 6.3.1
  • First release: Jun 17, 2015
  • Latest release: Apr 24, 2021
  • Number of updates: 19
  • Update frequency: every 112.6 days
  • Top authors: rilwis (100%)

Code review

54 tests

User reviews

1 review

Install metrics

600+ active /9,466 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼0.14ms] Passed 4 tests

An overview of server-side resources used by Meta Box Text Limiter
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.54 ▼0.57
Dashboard /wp-admin3.31 ▲0.0144.38 ▼2.67
Posts /wp-admin/edit.php3.36 ▲0.0150.15 ▲2.79
Add New Post /wp-admin/post-new.php5.89 ▲0.0193.74 ▲3.18
Media Library /wp-admin/upload.php3.24 ▲0.0136.12 ▼0.10

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Meta Box Text Limiter
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.37 ▼1.251.78 ▼0.1643.79 ▼5.23
Dashboard /wp-admin2,209 ▲215.79 ▼0.1197.34 ▼10.1739.23 ▼5.91
Posts /wp-admin/edit.php2,092 ▲32.03 ▲0.0140.06 ▲4.2834.24 ▲0.02
Add New Post /wp-admin/post-new.php1,547 ▲1818.40 ▲0.08608.85 ▼48.3166.08 ▲7.70
Media Library /wp-admin/upload.php1,391 ▲64.24 ▲0.01100.36 ▲1.3441.49 ▼5.38

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 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/meta-box-text-limiter/text-limiter.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: meta-boxes, custom-fields, custom-field, text limit, word limit...

meta-box-text-limiter/text-limiter.php 92% from 13 tests

The principal PHP file in "Meta Box Text Limiter" v. 1.1.3 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("meta-box-text-limiter.php" instead of "text-limiter.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
There were no executable files found in this plugin126 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript116562
PHP1163952
CSS10012

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.64
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity3.60
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.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
PNG images were not found in this plugin