93% tripadvisor-shortcode

Code Review | Tripadvisor Shortcode

WordPress plugin Tripadvisor Shortcode scored 93% from 54 tests.

About plugin

  • Plugin page: tripadvisor-short...
  • Plugin version: 2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.8
  • WordPress version: 5.8.1
  • First release: Sep 2, 2012
  • Latest release: Apr 22, 2014
  • Number of updates: 14
  • Update frequency: every 42.6 days
  • Top authors: ypraise (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

500+ active / 15,349 total downloads

Benchmarks

Plugin footprint Passed 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.02MB] [CPU: ▼143.57ms] Passed 4 tests

Server-side resources used by Tripadvisor Shortcode
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1334.63 ▲9.75
Dashboard /wp-admin3.08 ▲0.0341.80 ▼5.61
Posts /wp-admin/edit.php3.13 ▲0.0346.73 ▼5.52
Add New Post /wp-admin/post-new.php5.44 ▲0.0195.81 ▼557.94
Media Library /wp-admin/upload.php3.02 ▲0.0230.43 ▼5.19
TripAdvisor SC /wp-admin/options-general.php?page=tripadvisorsc2.9927.43

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Tripadvisor Shortcode: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,684 ▲8815.80 ▲0.348.87 ▲2.7852.34 ▼0.81
Dashboard /wp-admin2,978 ▲475.87 ▼0.13147.81 ▼5.63122.53 ▲10.51
Posts /wp-admin/edit.php2,744 ▲52.69 ▼0.0170.07 ▲0.7297.96 ▲3.56
Add New Post /wp-admin/post-new.php1,686 ▲7118.74 ▼2.27381.87 ▲98.37107.67 ▼4.52
Media Library /wp-admin/upload.php1,815 ▲85.00 ▲0.01167.24 ▲16.61116.04 ▼3.38
TripAdvisor SC /wp-admin/options-general.php?page=tripadvisorsc1,0782.0557.5571.51

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstall script ran successfully

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 no errors were found, this is by no means 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
Please 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 undefined function add_action() in wp-content/plugins/tripadvisor-shortcode/tripadvisorsc.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Screenshots: Add an image for screenshot #1 (TripAdvisor feeds displayed by the shortcode.)
  • Contributors: Plugin contributors not specified
Please take inspiration from this readme.txt

tripadvisor-shortcode/tripadvisorsc.php 92% from 13 tests

The main file in "Tripadvisor Shortcode" v. 2.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("tripadvisor-shortcode.php" instead of "tripadvisorsc.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected79 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1442479

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.62
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin