77% psydro-reviews

Code Review | Psydro Reviews

WordPress plugin Psydro Reviews scored77%from 54 tests.

About plugin

  • Plugin page: psydro-reviews
  • Plugin version: 0.0.6
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jul 31, 2018
  • Latest release: Oct 23, 2019
  • Number of updates: 18
  • Update frequency: every 26.1 days
  • Top authors: psydro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /671 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.13MB] [CPU: ▼6.16ms] Passed 4 tests

This is a short check of server-side resources used by Psydro Reviews
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1046.69 ▲5.45
Dashboard /wp-admin3.45 ▲0.1152.79 ▼13.23
Posts /wp-admin/edit.php3.57 ▲0.2157.20 ▲5.54
Add New Post /wp-admin/post-new.php6.05 ▲0.1788.03 ▼13.77
Media Library /wp-admin/upload.php3.38 ▲0.1537.92 ▼3.09

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 68 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Psydro Reviews
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲8814.73 ▲0.461.86 ▲0.0943.71 ▼0.08
Dashboard /wp-admin2,240 ▲625.93 ▲0.3190.20 ▼10.1538.49 ▼3.94
Posts /wp-admin/edit.php2,144 ▲362.37 ▲0.3637.62 ▼5.3134.38 ▲1.49
Add New Post /wp-admin/post-new.php1,562 ▲2723.35 ▲5.27673.49 ▲37.6635.77 ▼29.48
Media Library /wp-admin/upload.php1,445 ▲484.66 ▲0.46102.37 ▼13.8140.92 ▼8.88

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 25× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/psydro-reviews/templates/modal/otp.php
    • > /wp-content/plugins/psydro-reviews/includes/modals/class-psydro-review-read-more.php
    • > /wp-content/plugins/psydro-reviews/includes/modals/class-psydro-reviews-thank-you.php
    • > /wp-content/plugins/psydro-reviews/includes/modals/class-psydro-reviews-forgot-password.php
    • > /wp-content/plugins/psydro-reviews/templates/modal/signup.php
    • > /wp-content/plugins/psydro-reviews/includes/modals/class-psydro-reviews-write-review.php
    • > /wp-content/plugins/psydro-reviews/includes/modals/abstract-class-psydro-reviews-modal.php
    • > /wp-content/plugins/psydro-reviews/templates/modal/write-review.php
    • > /wp-content/plugins/psydro-reviews/templates/modal/review-read-more.php
    • > /wp-content/plugins/psydro-reviews/includes/admin/class-psydro-reviews-add-meta-box.php
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Use of undefined constant PSYDRO_REVIEWS_PLUGIN_URL - assumed 'PSYDRO_REVIEWS_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/psydro-reviews/templates/modal/signup.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/psydro-reviews/functions.php:10
    • > PHP Warning
      Use of undefined constant PSYDRO_REVIEWS_PLUGIN_URL - assumed 'PSYDRO_REVIEWS_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/psydro-reviews/templates/modal/forgot.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function psydro() in wp-content/plugins/psydro-reviews/templates/admin/options.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/psydro-reviews/templates/psydro-slider.php:1
    • > PHP Warning
      Use of undefined constant PSYDRO_REVIEWS_PLUGIN_URL - assumed 'PSYDRO_REVIEWS_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/psydro-reviews/templates/modal/signin.php on line 5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% 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
Please fix the following attributes:
  • Stable tag: No value
  • Requires at least: Version not formatted correctly
  • Requires php: Version not formatted correctly
You can take inspiration from this readme.txt

psydro-reviews/psydro-reviews.php Passed 13 tests

The primary PHP file in "Psydro Reviews" version 0.0.6 is used by WordPress to initiate all plugin functionality
43 characters long description:
Psydro Reviews – is used to give reviews.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected13,137 lines of code in 52 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript152,4949079,437
CSS698562,235
PHP30233221,458
YAML1007

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity4.56
▷ Minimum class complexity1.00
▷ Maximum class complexity15.00
Average method complexity1.89
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes18
▷ Abstract classes15.56%
▷ Concrete classes1794.44%
▷ Final classes00.00%
Methods73
▷ Static methods1723.29%
▷ Public methods7197.26%
▷ Protected methods00.00%
▷ Private methods22.74%
Functions7
▷ Named functions685.71%
▷ Anonymous functions114.29%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 PNG files occupy 0.53MB with 0.31MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/PsydroSlidershortcode.png87.19KB29.71KB▼ 65.92%
img/verticalslider.png51.99KB15.69KB▼ 69.82%
img/download.png161.55KB55.41KB▼ 65.70%
img/AddnewSlider.png92.70KB31.38KB▼ 66.14%
assets/images/psydro-logo.png3.37KB2.59KB▼ 23.12%