84% eth-simple-shortlinks

Code Review | ETH Simple Shortlinks

WordPress plugin ETH Simple Shortlinks scored84%from 54 tests.

About plugin

  • Plugin page: eth-simple-shortl...
  • Plugin version: 0.6.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.0
  • WordPress version: 6.3.1
  • First release: Apr 4, 2016
  • Latest release: Jul 1, 2022
  • Number of updates: 18
  • Update frequency: every 126.6 days
  • Top authors: ethitter (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,477 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼4.95ms] Passed 4 tests

Analyzing server-side resources used by ETH Simple Shortlinks
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.76 ▼1.65
Dashboard /wp-admin3.35 ▲0.0152.28 ▼12.00
Posts /wp-admin/edit.php3.47 ▲0.1149.94 ▼3.25
Add New Post /wp-admin/post-new.php5.93 ▲0.0594.47 ▲0.98
Media Library /wp-admin/upload.php3.28 ▲0.0536.04 ▼2.91

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for ETH Simple Shortlinks
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲8213.56 ▼0.661.78 ▼0.2144.72 ▼2.77
Dashboard /wp-admin2,235 ▲324.90 ▼0.95105.57 ▲3.4439.02 ▼0.74
Posts /wp-admin/edit.php2,122 ▲222.03 ▲0.0541.02 ▼1.6234.92 ▼2.18
Add New Post /wp-admin/post-new.php1,565 ▲1718.20 ▼4.91624.24 ▼38.1957.41 ▲5.18
Media Library /wp-admin/upload.php1,414 ▲144.24 ▲0.0097.58 ▼3.2944.70 ▲0.06

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% 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 | 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
Please fix the following items
  • 2× 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/eth-simple-shortlinks/inc/class-eth-simple-shortlinks.php:124
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/eth-simple-shortlinks/inc/class-eth-simple-shortlinks.php:124

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
2 plugin tags: shortlinks, shortlink

eth-simple-shortlinks/eth-simple-shortlinks.php Passed 13 tests

"ETH Simple Shortlinks" version 0.6.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
40 characters long description:
Simple non-GET shortlinks using post IDs

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
Everything looks great! No dangerous files found in this plugin210 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP270244210

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity26.00
▷ Minimum class complexity26.00
▷ Maximum class complexity26.00
Average method complexity2.39
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods18
▷ Static methods15.56%
▷ Public methods1583.33%
▷ Protected methods00.00%
▷ Private methods316.67%
Functions1
▷ Named functions1100.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
No PNG files were detected