68% ppm-testimonial

Code Review | PPM Testimonial

WordPress plugin PPM Testimonial scored68%from 54 tests.

About plugin

  • Plugin page: ppm-testimonial
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 6.3.1
  • First release: May 28, 2013
  • Latest release: Jun 3, 2013
  • Number of updates: 5
  • Update frequency: every 1.2 days
  • Top authors: perfectpointmarketing (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

100+ active /3,757 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▼1.93MB] [CPU: ▼53.39ms] Passed 4 tests

A check of server-side resources used by PPM Testimonial
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.416.04 ▼34.84
Dashboard /wp-admin2.07 ▼1.235.48 ▼43.85
Posts /wp-admin/edit.php2.07 ▼1.285.84 ▼45.89
Add New Post /wp-admin/post-new.php2.07 ▼3.815.70 ▼88.98
Media Library /wp-admin/upload.php2.07 ▼1.165.16 ▼30.10
Testimonials /wp-admin/edit.php?post_type=ppm-testimonial2.075.10
Add New /wp-admin/post-new.php?post_type=ppm-testimonial2.076.29

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for PPM Testimonial
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,941 ▲19513.44 ▼1.189.45 ▲7.4844.72 ▲2.09
Dashboard /wp-admin2,228 ▲485.56 ▼0.1093.89 ▲6.1662.58 ▲19.96
Posts /wp-admin/edit.php2,133 ▲302.01 ▼0.0238.04 ▼3.6231.02 ▼7.16
Add New Post /wp-admin/post-new.php1,556 ▲2123.20 ▲4.72605.93 ▼57.5150.96 ▼8.02
Media Library /wp-admin/upload.php1,436 ▲364.15 ▼0.09100.26 ▼5.2743.83 ▼4.66
Testimonials /wp-admin/edit.php?post_type=ppm-testimonial1,0971.9932.2632.94
Add New /wp-admin/post-new.php?post_type=ppm-testimonial2,2477.74175.3379.90

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the ppm-tm-plugin-main-active handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=ppm-testimonial
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the ppm-tm-plugin-main-active handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=ppm-testimonial
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the ppm-tm-plugin-script-active handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=ppm-testimonial
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the ppm-tm-plugin-style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

SRP 50% 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 take a closer look at the following
  • 3× PHP files trigger server errors when accessed directly:
    • > 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/ppm-testimonial/plugin-hook.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/ppm-testimonial/plugin-hook.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ppm-testimonial/testimonial-type.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Donate link: Invalid URI ("")
  • Screenshots: These screenshots require images: #1 (PPM Testimonial in a post), #2 (PPM Testimonial Admin Panel Screenshot.)
You can look at the official readme.txt

ppm-testimonial/plugin-hook.php 92% from 13 tests

The main file in "PPM Testimonial" v. 1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("ppm-testimonial.php" instead of "plugin-hook.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin185 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript32539112
PHP2192072
CSS1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.05
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/quote.png1.19KB0.28KB▼ 76.19%
js/testimonial.png1.73KB1.02KB▼ 41.07%