94% display-content-length

Code Review | Display Content Length

WordPress plugin Display Content Length scored 94% from 53 tests.

About plugin

  • Plugin page: display-content-l...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress version: 5.8.1
  • First release: Jan 18, 2018
  • Latest release: Jan 19, 2018
  • Number of updates: 9
  • Update frequency: every 0.9 days
  • Top authors: ayangyuan (100%)

Code review

53 tests

User reviews

1 review

Install metrics

20+ active / 554 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼284.44ms] Passed 4 tests

Analyzing server-side resources used by Display Content Length
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1334.24 ▲14.25
Dashboard /wp-admin3.08 ▲0.0240.49 ▲3.76
Posts /wp-admin/edit.php3.13 ▲0.0242.38 ▲1.64
Add New Post /wp-admin/post-new.php5.44 ▲0.0188.51 ▼1,138.59
Media Library /wp-admin/upload.php3.02 ▲0.0132.77 ▼4.55

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Display Content Length
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,650 ▲4416.17 ▲0.657.56 ▼0.1650.98 ▲1.43
Dashboard /wp-admin2,931 ▲786.13 ▲0.12135.02 ▲0.34116.79 ▲16.35
Posts /wp-admin/edit.php2,726 ▲202.69 ▼0.0264.75 ▼0.6594.98 ▲5.74
Add New Post /wp-admin/post-new.php1,483 ▼36818.42 ▲0.96353.99 ▼9.16107.99 ▲1.15
Media Library /wp-admin/upload.php1,772 ▼34.98 ▼0.04145.06 ▲2.97114.83 ▲5.26

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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 following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/display-content-length/display-content-length.php:30

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

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
8 plugin tags: optimize performance, empty post, post content, related posts, posts...

display-content-length/display-content-length.php 92% from 13 tests

Analyzing the main PHP file in "Display Content Length" version 1.0.4
You should first fix the following items:
  • Domain Path: The domain path points to a folder that does not exist ("/res/lang")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin52 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP192652

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
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%
Functions5
▷ Named functions120.00%
▷ Anonymous functions480.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

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