66% crs-post-title-shortener

Code Review | CRS Post Title Shortener

WordPress plugin CRS Post Title Shortener scored66%from 54 tests.

About plugin

  • Plugin page: crs-post-title-sh...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.2
  • WordPress version: 6.3.1
  • First release: Jan 29, 2018
  • Latest release: Jan 29, 2018
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: crswebb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /652 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.62MB] [CPU: ▼21.07ms] Passed 4 tests

This is a short check of server-side resources used by CRS Post Title Shortener
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0743.34 ▲3.18
Dashboard /wp-admin3.37 ▲0.0350.70 ▼18.19
Posts /wp-admin/edit.php3.49 ▲0.1352.15 ▲6.51
Add New Post /wp-admin/post-new.php3.22 ▼2.6637.19 ▼73.37
Media Library /wp-admin/upload.php3.30 ▲0.0738.51 ▲4.10
CRS Post Title /wp-admin/options-general.php?page=crs-post-title-shortener3.2734.11

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for CRS Post Title Shortener
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,905 ▲15913.42 ▼0.939.11 ▲7.4745.54 ▲1.34
Dashboard /wp-admin2,206 ▲265.68 ▲0.1585.72 ▼6.2138.42 ▼5.69
Posts /wp-admin/edit.php2,111 ▲141.97 ▼0.0139.97 ▲1.4933.07 ▼1.09
Add New Post /wp-admin/post-new.php1,535 ▲722.98 ▼0.18679.39 ▲1.6048.94 ▼13.66
Media Library /wp-admin/upload.php1,402 ▼14.13 ▼0.0599.78 ▼4.6145.47 ▼0.27
CRS Post Title /wp-admin/options-general.php?page=crs-post-title-shortener8462.0223.4626.81

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=crs-post-title-shortener
    • > Notice in wp-content/plugins/crs-post-title-shortener/admin/partials/crs-post-title-shortener-admin-display.php+31
    Trying to access array offset on value of type bool

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/crs-post-title-shortener/public/partials/crs-post-title-shortener-public-display.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/crs-post-title-shortener/admin/partials/crs-post-title-shortener-admin-display.php:19

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
    • > GET request to /wp-admin/options-general.php?page=crs-post-title-shortener
    • > Network (severe)
    wp-content/plugins/crs-post-title-shortener/admin/css/crs-post-title-shortener-admin.css?ver=1.0.0 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=crs-post-title-shortener
    • > Network (severe)
    wp-content/plugins/crs-post-title-shortener/admin/js/crs-post-title-shortener-admin.js?ver=1.0.0 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Plugin Name: Please specify the plugin name on the first line ( === crs-post-title-shortener === )
The official readme.txt is a good inspiration

crs-post-title-shortener/CRS-Post-Title-Shortener.php 85% from 13 tests

The main file in "CRS Post Title Shortener" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("crs-post-title-shortener.php" instead of "CRS-Post-Title-Shortener.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin315 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12150558309
JavaScript24546
CSS2080

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity4.00
▷ Minimum class complexity1.00
▷ Maximum class complexity14.00
Average method complexity1.66
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods32
▷ Static methods26.25%
▷ Public methods2784.38%
▷ Protected methods00.00%
▷ Private methods515.62%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin