62% testimonial-or-reviews

Code Review | Testimonial or Reviews

WordPress plugin Testimonial or Reviews scored 62% from 53 tests.

About plugin

  • Plugin page: testimonial-or-re...
  • Plugin version: 1.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.9.6
  • WordPress version: 5.8.1
  • First release: May 22, 2018
  • Latest release: May 22, 2018
  • Number of updates: 2
  • Update frequency: every 53.5 days
  • Top authors: biplob018 (100%)

Code review

53 tests

User reviews

1 review

Install metrics

40+ active / 1,025 total downloads

Benchmarks

Plugin footprint 65% 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.18MB] [CPU: ▼384.10ms] Passed 4 tests

This is a short check of server-side resources used by Testimonial or Reviews
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.99 ▲0.2730.39 ▲7.98
Dashboard /wp-admin3.23 ▲0.1743.11 ▼6.38
Posts /wp-admin/edit.php3.34 ▲0.2352.10 ▲4.78
Add New Post /wp-admin/post-new.php5.59 ▲0.1695.24 ▼1,530.06
Media Library /wp-admin/upload.php3.17 ▲0.1634.13 ▼4.72
Testimonial or Reviews /wp-admin/admin.php?page=orphita-testimonial-or-reviews-admin3.3132.24
Welcome To Accordions or FAQs /wp-admin/index.php?page=orphita-testimonial-or-reviews-welcome3.1425.91
Settings /wp-admin/admin.php?page=orphita-testimonial-or-reviews-license3.1432.25
Create New /wp-admin/admin.php?page=orphita-testimonial-or-reviews-admin-new3.3134.08
Import Templates /wp-admin/admin.php?page=orphita-testimonial-or-reviews-admin-import3.3137.29

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 92 new files
Database: 3 new tables, 3 new options
New tables
wp_oxi_div_style
wp_oxi_div_import
wp_oxi_div_list
New WordPress options
orphita_review_data_active
widget_orphita_testimonial_or_reviews_widget
oxi_div_database

Browser metrics Passed 4 tests

An overview of browser requirements for Testimonial or Reviews
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,744 ▲12215.98 ▲0.468.30 ▼0.5346.40 ▼4.74
Dashboard /wp-admin3,001 ▲1295.99 ▼0.04147.60 ▼10.90106.85 ▼7.06
Posts /wp-admin/edit.php2,753 ▲472.70 ▲0.0163.14 ▲0.7494.29 ▲0.59
Add New Post /wp-admin/post-new.php1,684 ▲2818.74 ▲1.70370.33 ▼4.65115.91 ▲6.65
Media Library /wp-admin/upload.php1,760 ▼125.00 ▲0.02157.65 ▲3.70113.57 ▲6.69
Testimonial or Reviews /wp-admin/admin.php?page=orphita-testimonial-or-reviews-admin1,2072.5263.0780.22
Welcome To Accordions or FAQs /wp-admin/index.php?page=orphita-testimonial-or-reviews-welcome1,1042.0957.4985.83
Settings /wp-admin/admin.php?page=orphita-testimonial-or-reviews-license1,1772.1159.2179.76
Create New /wp-admin/admin.php?page=orphita-testimonial-or-reviews-admin-new1,8872.6155.02481.31
Import Templates /wp-admin/admin.php?page=orphita-testimonial-or-reviews-admin-import3,5512.6054.68212.86

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 3 tables in the database
    • wp_oxi_div_list
    • wp_oxi_div_style
    • wp_oxi_div_import
  • This plugin does not fully uninstall, leaving 3 options in the database
    • orphita_review_data_active
    • widget_orphita_testimonial_or_reviews_widget
    • oxi_div_database

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
The following issues need your attention
  • 16× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/testimonial-or-reviews/layouts/style9.php
    • > /wp-content/plugins/testimonial-or-reviews/layouts/style5.php
    • > /wp-content/plugins/testimonial-or-reviews/layouts/style10.php
    • > /wp-content/plugins/testimonial-or-reviews/layouts/style1.php
    • > /wp-content/plugins/testimonial-or-reviews/layouts/style6.php
    • > /wp-content/plugins/testimonial-or-reviews/layouts/style13.php
    • > /wp-content/plugins/testimonial-or-reviews/layouts/style7.php
    • > /wp-content/plugins/testimonial-or-reviews/layouts/style3.php
    • > /wp-content/plugins/testimonial-or-reviews/layouts/style14.php
    • > /wp-content/plugins/testimonial-or-reviews/layouts/style12.php
  • 42× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/testimonial-or-reviews/layouts/style7.php on line 27
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/testimonial-or-reviews/layouts/style3.php on line 28
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/testimonial-or-reviews/layouts/style8.php on line 7
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/testimonial-or-reviews/layouts/style11.php on line 39
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/testimonial-or-reviews/layouts/style16.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/testimonial-or-reviews/widget.php:13
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/testimonial-or-reviews/layouts/style9.php on line 12
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/testimonial-or-reviews/layouts/style1.php on line 27
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/testimonial-or-reviews/layouts/style9.php on line 60
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/testimonial-or-reviews/layouts/style13.php on line 38

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=orphita-testimonial-or-reviews-admin-import
    • > Javascript (severe) in unknown
    /wp-content/plugins/testimonial-or-reviews/helper/vendor.js?ver=5.8.1 1:30 Uncaught TypeError: jQuery(...).fontselect is not a function

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% 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 your attention: Please take inspiration from this readme.txt

testimonial-or-reviews/index.php 85% from 13 tests

The primary PHP file in "Testimonial or Reviews" version 1.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("testimonial-or-reviews.php" instead of "index.php")
  • Description: The description should be shorter than 140 characters (currently 147 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin23,337 lines of code in 79 files:
LanguageFilesBlank linesComment linesLines of code
PHP5135916114,200
JavaScript205049504,193
SVG1002,671
CSS7379232,273

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity38.00
▷ Minimum class complexity3.00
▷ Maximum class complexity73.00
Average method complexity5.93
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods1386.67%
▷ Protected methods00.00%
▷ Private methods213.33%
Functions75
▷ Named functions75100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin