84% custom-excerpt-length

Code Review | Custom Excerpt Length

WordPress plugin Custom Excerpt Length scored84%from 54 tests.

About plugin

  • Plugin page: custom-excerpt-le...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.1.0
  • WordPress version: 6.3.1
  • First release: May 31, 2016
  • Latest release: Feb 14, 2019
  • Number of updates: 9
  • Update frequency: every 109.9 days
  • Top authors: thekrotek (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /2,774 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.02MB] [CPU: ▼1.15ms] Passed 4 tests

A check of server-side resources used by Custom Excerpt Length
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0145.52 ▲1.49
Dashboard /wp-admin3.33 ▲0.0245.33 ▼1.06
Posts /wp-admin/edit.php3.38 ▲0.0249.21 ▲6.53
Add New Post /wp-admin/post-new.php5.91 ▲0.0297.19 ▼6.56
Media Library /wp-admin/upload.php3.25 ▲0.0237.27 ▲1.52

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Custom Excerpt Length: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.43 ▼0.221.62 ▲0.0339.42 ▲2.78
Dashboard /wp-admin2,203 ▲155.80 ▼0.05102.16 ▼15.4041.09 ▼7.05
Posts /wp-admin/edit.php2,092 ▼02.00 ▼0.0240.46 ▲4.6135.00 ▲1.14
Add New Post /wp-admin/post-new.php1,514 ▼017.48 ▲0.13639.80 ▼12.5154.08 ▼0.30
Media Library /wp-admin/upload.php1,388 ▼04.38 ▲0.2295.41 ▼6.9243.03 ▼1.97

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

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
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
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/custom-excerpt-length/custom-excerpt-length.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

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
7 plugin tags: formatting, excerpt limit, settings, excerpt length, length...

custom-excerpt-length/custom-excerpt-length.php 92% from 13 tests

"Custom Excerpt Length" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin50 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1191150

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.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

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