84% text-snipper

Code Review | Text Snipper

WordPress plugin Text Snipper scored84%from 54 tests.

About plugin

  • Plugin page: text-snipper
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 11, 2016
  • Latest release: Dec 18, 2016
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: jordanwebdev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,523 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.49ms] Passed 4 tests

A check of server-side resources used by Text Snipper
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.32 ▼4.19
Dashboard /wp-admin3.31 ▲0.0147.07 ▼8.27
Posts /wp-admin/edit.php3.36 ▲0.0049.63 ▼2.52
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.96 ▼14.08
Media Library /wp-admin/upload.php3.23 ▲0.0032.74 ▼3.41
Text Snipper /wp-admin/options-general.php?page=text-snipper-settings3.2031.17

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Text Snipper
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.62 ▲0.271.71 ▼0.8439.34 ▼7.06
Dashboard /wp-admin2,196 ▲165.64 ▼0.0387.40 ▼6.8947.45 ▲5.89
Posts /wp-admin/edit.php2,104 ▲42.01 ▲0.0135.48 ▼4.9340.52 ▲8.99
Add New Post /wp-admin/post-new.php1,538 ▲118.36 ▲0.36641.60 ▲6.2164.84 ▼11.33
Media Library /wp-admin/upload.php1,401 ▼24.30 ▲0.12104.26 ▲1.0941.63 ▼2.98
Text Snipper /wp-admin/options-general.php?page=text-snipper-settings7862.0325.1623.26

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/text-snipper/text-snipper.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Screenshots: These screenshots do not have images: #1 (Settings page with an HTML class entered.), #2 (Truncation in action.)
Please take inspiration from this readme.txt

text-snipper/text-snipper.php Passed 13 tests

This is the main PHP file of "Text Snipper" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
40 characters long description:
Multiline text truncation with ellipses.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin95 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2201754
JavaScript110641

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.22
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
There were not PNG files found in your plugin