10% spantext

Code Review | SpanText

WordPress plugin SpanText scored10%from 54 tests.

About plugin

  • Plugin page: spantext
  • Plugin version: 1.6.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7.5
  • WordPress version: 6.3.1
  • First release: Jan 28, 2016
  • Latest release: May 17, 2017
  • Number of updates: 39
  • Update frequency: every 12.2 days
  • Top authors: nbeversluis (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /637 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/spantext/spantext.php+16
    Methods with the same name as their class will not be constructors in a future version of PHP; SpanText has a deprecated constructor

Server metrics [RAM: ▼1.93MB] [CPU: ▼52.88ms] Passed 4 tests

This is a short check of server-side resources used by SpanText
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.404.52 ▼33.76
Dashboard /wp-admin2.09 ▼1.265.79 ▼54.53
Posts /wp-admin/edit.php2.09 ▼1.276.82 ▼42.08
Add New Post /wp-admin/post-new.php2.09 ▼3.805.22 ▼81.16
Media Library /wp-admin/upload.php2.09 ▼1.145.42 ▼26.72

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for SpanText
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,897 ▲15113.70 ▼0.895.41 ▲3.7644.31 ▲6.88
Dashboard /wp-admin2,215 ▲265.92 ▲1.02116.64 ▼7.0739.95 ▼3.40
Posts /wp-admin/edit.php2,098 ▲92.04 ▲0.0538.78 ▼0.4634.84 ▲0.76
Add New Post /wp-admin/post-new.php1,529 ▲1518.12 ▲0.46603.66 ▼95.1362.70 ▲16.46
Media Library /wp-admin/upload.php1,391 ▲34.26 ▼0.0393.98 ▼1.5341.22 ▼4.54

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/spantext/spantext.php+16
    Methods with the same name as their class will not be constructors in a future version of PHP; SpanText has a deprecated constructor
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
Please fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/spantext/spantext.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
7 plugin tags: information, text, animation, documentation, writing...

spantext/spantext.php Passed 13 tests

"SpanText" version 1.6.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
28 characters long description:
JavaScript Transforming Text

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin1,570 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript25073691,282
CSS12134233
PHP1211155

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.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

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