84% text2anchor

Code Review | Text2Anchor

WordPress plugin Text2Anchor scored84%from 54 tests.

About plugin

  • Plugin page: text2anchor
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.9.4
  • WordPress version: 6.3.1
  • First release: Jun 17, 2016
  • Latest release: Mar 3, 2018
  • Number of updates: 4
  • Update frequency: every 158.0 days
  • Top authors: beek.yoshida (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /460 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.26MB] [CPU: ▼13.57ms] Passed 4 tests

Server-side resources used by Text2Anchor
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.82 ▲1.04
Dashboard /wp-admin3.38 ▲0.0751.76 ▼3.05
Posts /wp-admin/edit.php3.43 ▲0.0747.95 ▼6.99
Add New Post /wp-admin/post-new.php4.67 ▼1.2245.10 ▼44.65
Media Library /wp-admin/upload.php3.30 ▲0.0738.11 ▲0.40
Text2Anchor /wp-admin/plugins.php?page=text2anchor/text2anchor.php3.2632.05

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Text2Anchor
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.61 ▼0.691.75 ▼0.1042.36 ▲0.63
Dashboard /wp-admin2,207 ▲334.84 ▼1.09109.46 ▲1.6641.85 ▼2.78
Posts /wp-admin/edit.php2,093 ▲12.01 ▼0.0138.37 ▼4.4933.55 ▼3.91
Add New Post /wp-admin/post-new.php1,545 ▲823.22 ▲0.07685.38 ▼14.6751.53 ▼12.88
Media Library /wp-admin/upload.php1,395 ▲74.37 ▲0.1999.20 ▲0.0647.52 ▲6.63
Text2Anchor /wp-admin/plugins.php?page=text2anchor/text2anchor.php1,0922.0725.3931.72

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/text2anchor/text2anchor.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
There were no plugin tags found

text2anchor/text2anchor.php Passed 13 tests

"Text2Anchor" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
21 characters long description:
Change text to anchor

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin148 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11821148

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity66.00
▷ Minimum class complexity66.00
▷ Maximum class complexity66.00
Average method complexity22.67
▷ Minimum method complexity1.00
▷ Maximum method complexity66.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin