10% easy-text-links

Code Review | Easy Text Links

WordPress plugin Easy Text Links scored10%from 54 tests.

About plugin

  • Plugin page: easy-text-links
  • Plugin version: 3.00
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.8
  • WordPress version: 6.3.1
  • First release: Apr 22, 2013
  • Latest release: Aug 1, 2017
  • Number of updates: 55
  • Update frequency: every 28.4 days
  • Top authors: manojtd (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

60+ active /17,143 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
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/easy-text-links/EzOptions.php+21
    Methods with the same name as their class will not be constructors in a future version of PHP; EzBaseOption has a deprecated constructor

Server metrics [RAM: ▼1.63MB] [CPU: ▼60.69ms] Passed 4 tests

This is a short check of server-side resources used by Easy Text Links
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.36 ▼1.116.02 ▼37.05
Dashboard /wp-admin2.38 ▼0.939.22 ▼38.98
Posts /wp-admin/edit.php2.38 ▼0.987.89 ▼39.60
Add New Post /wp-admin/post-new.php2.38 ▼3.518.25 ▼127.13
Media Library /wp-admin/upload.php2.38 ▼0.856.94 ▼27.81

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Easy Text Links
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲4214.40 ▲0.131.67 ▲0.0644.53 ▲4.30
Dashboard /wp-admin2,206 ▲325.74 ▲0.1987.41 ▼0.1937.51 ▼3.71
Posts /wp-admin/edit.php2,114 ▲142.16 ▲0.1537.58 ▲0.9235.07 ▼2.04
Add New Post /wp-admin/post-new.php1,537 ▲923.31 ▲0.23652.40 ▼28.4664.94 ▼1.03
Media Library /wp-admin/upload.php1,414 ▲144.33 ▲0.1395.48 ▼1.9143.48 ▲1.06
Easy Text Links Lite /wp-admin/easy-text-links.php260.420.0914.00

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/easy-text-links/EzOptions.php+21
    Methods with the same name as their class will not be constructors in a future version of PHP; EzBaseOption has a deprecated constructor
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/easy-text-links/myPlugins.php:300
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/easy-text-links/adminPage.php:20
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/easy-text-links/ezDenyLite.php on line 22
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/easy-text-links/ezDenyLite.php on line 22
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/easy-text-links/ezDenyLite.php on line 22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/easy-text-links/EzOptions.php:544

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/easy-text-links.php
    • > Network (severe)
    wp-admin/easy-text-links.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: text links, text ads, expiring links, link ads, advertising...

easy-text-links/easy-text-links.php Passed 13 tests

"Easy Text Links" version 3.00's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
115 characters long description:
Lite Version: Make money from your blog by direct text link ad selling, with no complicated setup and no middlemen.

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
No dangerous file extensions were detected3,887 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP63151092,512
JavaScript2701381,275
CSS130100

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity12.25
▷ Minimum class complexity1.00
▷ Maximum class complexity69.00
Average method complexity2.58
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes00.00%
Methods142
▷ Static methods96.34%
▷ Public methods142100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions250.00%
▷ Anonymous functions250.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
15 PNG files occupy 0.12MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
expiry.png0.31KB0.27KB▼ 12.46%
email.png0.49KB0.49KB0.20%
add.png0.45KB0.60KB0.00%
img/ezpaypal.png9.22KB3.44KB▼ 62.72%
confirm.png0.67KB0.69KB0.00%