77% simple-google-testimonials

Code Review | Simple Google Testimonials

WordPress plugin Simple Google Testimonials scored77%from 54 tests.

About plugin

  • Plugin page: simple-google-tes...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7
  • WordPress version: 6.3.1
  • First release: Dec 30, 2016
  • Latest release: Jan 2, 2017
  • Number of updates: 2
  • Update frequency: every 8.5 days
  • Top authors: xvilo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /437 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 gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▲0.61ms] Passed 4 tests

This is a short check of server-side resources used by Simple Google Testimonials
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0948.13 ▲5.26
Dashboard /wp-admin3.38 ▲0.0852.45 ▲0.16
Posts /wp-admin/edit.php3.50 ▲0.1455.23 ▲4.84
Add New Post /wp-admin/post-new.php6.05 ▲0.1699.31 ▼7.82
Media Library /wp-admin/upload.php3.31 ▲0.0743.31 ▲8.18
Add New /wp-admin/post-new.php?post_type=testimonials6.0385.42
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=testimonials3.3038.91
All testimonials /wp-admin/edit.php?post_type=testimonials3.3639.83
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=testimonials3.3042.92

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
category_children

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simple Google Testimonials
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲4314.35 ▼0.002.14 ▲0.1742.62 ▼1.46
Dashboard /wp-admin2,230 ▲535.59 ▼0.0389.47 ▼5.8639.50 ▲0.20
Posts /wp-admin/edit.php2,135 ▲352.03 ▲0.0441.71 ▲3.0836.67 ▲0.94
Add New Post /wp-admin/post-new.php1,555 ▲2923.47 ▲1.28630.81 ▼175.8955.75 ▲0.61
Media Library /wp-admin/upload.php1,438 ▲354.27 ▲0.08102.08 ▼0.6043.97 ▼0.36
Add New /wp-admin/post-new.php?post_type=testimonials6,21422.56862.9229.03
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=testimonials1,3512.1228.8731.95
All testimonials /wp-admin/edit.php?post_type=testimonials1,1881.9833.2730.23
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=testimonials1,4872.2531.7835.80

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
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • category_children
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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 return non-empty strings:
    • > /wp-content/plugins/simple-google-testimonials/templates/testimonial.php
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/simple-google-testimonials/templates/testimonial-overview-item.php:2
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/simple-google-testimonials/templates/testimonial-overview-item.php on line 2
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/simple-google-testimonials/templates/testimonial-overview-item.php on line 2
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/simple-google-testimonials/templates/testimonial-overview-item.php on line 2
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/simple-google-testimonials/templates/testimonial-overview-item.php on line 2
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/simple-google-testimonials/templates/testimonial-overview-item.php on line 2
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/simple-google-testimonials/templates/testimonial-overview-item.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 83% 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
Attributes that need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === simple-google-testimonials === )
You can take inspiration from this readme.txt

simple-google-testimonials/testimonials.php 69% from 13 tests

The primary PHP file in "Simple Google Testimonials" version 1.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Domain Path: The domain path should be prefixed with a forward slash character ("/translations")
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Main file name: Name the main plugin file the same as the plugin slug ("simple-google-testimonials.php" instead of "testimonials.php")
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("translations")

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
Good job! No executable or dangerous file extensions detected603 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP72720367
PO File14446121
CSS481081
JavaScript32834

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity22.00
▷ Minimum class complexity22.00
▷ Maximum class complexity22.00
Average method complexity1.95
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods22
▷ Static methods22100.00%
▷ Public methods1150.00%
▷ Protected methods00.00%
▷ Private methods1150.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected