83% old-to-new-agoda-link-converter

Code Review | Old-to-New Agoda Link Converter

WordPress plugin Old-to-New Agoda Link Converter scored83%from 54 tests.

About plugin

  • Plugin page: old-to-new-agoda-...
  • Plugin version: 1.7.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.7.2
  • WordPress version: 6.3.1
  • First release: Jun 21, 2017
  • Latest release: Dec 13, 2017
  • Number of updates: 31
  • Update frequency: every 5.7 days
  • Top authors: ermisnomore (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /3,321 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
Installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼5.14ms] Passed 4 tests

This is a short check of server-side resources used by Old-to-New Agoda Link Converter
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0436.61 ▼5.20
Dashboard /wp-admin3.38 ▲0.0746.24 ▼4.12
Posts /wp-admin/edit.php3.48 ▲0.1244.12 ▼2.96
Add New Post /wp-admin/post-new.php6.07 ▲0.1883.46 ▼8.28
Media Library /wp-admin/upload.php3.32 ▲0.0935.22 ▼1.86

Server storage [IO: ▲10.04MB] [DB: ▲0.95MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 16 new files
Database: 2 new tables, 6 new options
New tables
wp_agoda_countries
wp_agoda_settings
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Old-to-New Agoda Link Converter
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲8913.30 ▼1.264.50 ▲2.6642.48 ▼6.44
Dashboard /wp-admin2,233 ▲425.90 ▲0.82101.55 ▼15.0239.84 ▼6.81
Posts /wp-admin/edit.php2,113 ▲242.02 ▲0.0236.28 ▼0.0936.31 ▲2.89
Add New Post /wp-admin/post-new.php1,535 ▼717.53 ▼0.76694.32 ▲60.9571.80 ▲9.36
Media Library /wp-admin/upload.php1,412 ▲214.23 ▲0.0398.94 ▲1.5941.88 ▼0.42

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_row() on null in wp-content/plugins/old-to-new-agoda-link-converter/includes/settings.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 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
These attributes need your attention: You can look at the official readme.txt

old-to-new-agoda-link-converter/agoda.php 85% from 13 tests

"Old-to-New Agoda Link Converter" version 1.7.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 252 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("old-to-new-agoda-link-converter.php" instead of "agoda.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected602 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP5232143580
SVG10122

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity25.33
▷ Minimum class complexity1.00
▷ Maximum class complexity59.00
Average method complexity3.52
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes133.33%
▷ Concrete classes266.67%
▷ Final classes00.00%
Methods29
▷ Static methods00.00%
▷ Public methods2896.55%
▷ Protected methods13.45%
▷ Private methods00.00%
Functions7
▷ Named functions7100.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
3 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/agoda-logo.png1.07KB1.21KB0.00%
images/agoda-logo-flat.png22.93KB12.27KB▼ 46.46%
includes/agoda-logo.png1.07KB1.21KB0.00%