84% url-shortener-4eq

Code Review | url Shortener 4eq

WordPress plugin url Shortener 4eq scored84%from 54 tests.

About plugin

  • Plugin page: url-shortener-4eq
  • Plugin version: 0.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.3.2
  • WordPress version: 6.3.1
  • First release: Jan 14, 2020
  • Latest release: Jan 14, 2020
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: saeedmoh031 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /514 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by url Shortener 4eq
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0044.68 ▼0.94
Dashboard /wp-admin3.31 ▲0.0150.37 ▼2.54
Posts /wp-admin/edit.php3.36 ▲0.0048.51 ▼2.63
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.85 ▼3.32
Media Library /wp-admin/upload.php3.23 ▲0.0041.26 ▲5.70

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

url Shortener 4eq: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲4513.21 ▼1.052.16 ▲0.2741.30 ▼1.67
Dashboard /wp-admin2,237 ▲345.84 ▼0.03114.03 ▼0.0438.44 ▼5.42
Posts /wp-admin/edit.php2,113 ▲132.00 ▲0.0036.78 ▼0.9038.74 ▲2.67
Add New Post /wp-admin/post-new.php1,567 ▲4118.20 ▼5.39621.54 ▼32.2556.53 ▲10.67
Media Library /wp-admin/upload.php1,416 ▲164.14 ▼0.09112.28 ▼4.0747.75 ▼1.95

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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 have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/url-shortener-4eq/urlshortener.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: link shortener, social media, url shortener

url-shortener-4eq/urlshortener.php 85% from 13 tests

The entry point to "url Shortener 4eq" version 0.1 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("url-shortener-4eq.php" instead of "urlshortener.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 190 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin219 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
CSS1192134
PHP1291385

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.15
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%
Functions5
▷ Named functions5100.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
5 PNG files occupy 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
image/octo-error.png5.51KB1.60KB▼ 70.89%
image/octo.png5.78KB1.70KB▼ 70.54%
image/golf.png3.40KB0.44KB▼ 87.19%
image/fish.png6.79KB3.23KB▼ 52.44%
screenshot-1.png21.17KB11.71KB▼ 44.70%