78% wpslimclamp

Code Review | wpslimclamp

WordPress plugin wpslimclamp scored78%from 54 tests.

About plugin

  • Plugin page: wpslimclamp
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.7
  • WordPress version: 6.3.1
  • First release: Nov 21, 2016
  • Latest release: Dec 8, 2016
  • Number of updates: 2
  • Update frequency: every 7.0 days
  • Top authors: jnhghy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /556 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.16MB] [CPU: ▼17.28ms] Passed 4 tests

An overview of server-side resources used by wpslimclamp
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0742.35 ▲0.36
Dashboard /wp-admin3.18 ▼0.1228.65 ▼24.54
Posts /wp-admin/edit.php3.26 ▼0.1033.06 ▼15.38
Add New Post /wp-admin/post-new.php5.50 ▼0.3972.56 ▼19.13
Media Library /wp-admin/upload.php3.21 ▼0.0227.42 ▼10.07
WPSlimClamp /wp-admin/options-general.php?page=wpslimclamp3.2634.68

Server storage [IO: ▲0.14MB] [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: 27 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for wpslimclamp
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,881 ▲12013.43 ▼0.928.83 ▲7.1742.09 ▼11.78
Dashboard /wp-admin2,196 ▲195.63 ▼0.0591.99 ▼3.5842.99 ▲1.43
Posts /wp-admin/edit.php2,107 ▲102.00 ▼0.0139.20 ▲2.4337.15 ▲2.19
Add New Post /wp-admin/post-new.php1,529 ▼223.69 ▲0.54617.47 ▼47.3565.13 ▲10.80
Media Library /wp-admin/upload.php1,407 ▲74.27 ▲0.07101.41 ▲2.3940.86 ▼1.05
WPSlimClamp /wp-admin/options-general.php?page=wpslimclamp8892.0627.3426.65

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
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wpslimclamp/public/partials/wpslimclamp-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/wpslimclamp/admin/partials/wpslimclamp-admin-display.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (Admin settings page screenshot), #2 (Long title with anchor clamp example), #3 (Content clamp example)
You can look at the official readme.txt

wpslimclamp/wpslimclamp.php Passed 13 tests

"wpslimclamp" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
76 characters long description:
Clamp text to fit containers, easy way to limit text to specific row number.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin422 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP12132511232
JavaScript46695186
CSS2184

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.07
Average class complexity1.57
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.14
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods28
▷ Static methods27.14%
▷ Public methods2382.14%
▷ Protected methods00.00%
▷ Private methods517.86%
Functions4
▷ Named functions4100.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
3 PNG files occupy 0.09MB with 0.05MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-3.png23.25KB9.78KB▼ 57.95%
assets/screenshot-2.png24.53KB9.93KB▼ 59.53%
assets/screenshot-1.png39.41KB15.16KB▼ 61.54%