10% contempo-reviews

Code Review | WP Star Reviews, Map, and Testimonials

WordPress plugin WP Star Reviews, Map, and Testimonials scored10%from 54 tests.

About plugin

  • Plugin page: contempo-reviews
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.1-3.7.1
  • WordPress version: 6.3.1
  • First release: Nov 10, 2013
  • Latest release: Nov 10, 2013
  • Number of updates: 20
  • Update frequency: N/A
  • Top authors: jleo2255 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /2,656 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/contempo-reviews/includes/admin/ctpo_interface.php+251
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.69MB] [CPU: ▼56.62ms] Passed 4 tests

Analyzing server-side resources used by WP Star Reviews, Map, and Testimonials
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.28 ▼1.235.91 ▼39.14
Dashboard /wp-admin2.39 ▼1.009.66 ▼51.84
Posts /wp-admin/edit.php2.39 ▼1.019.03 ▼42.01
Add New Post /wp-admin/post-new.php2.39 ▼3.549.31 ▼93.47
Media Library /wp-admin/upload.php2.39 ▼0.889.53 ▼28.75

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

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

Browser metrics Passed 4 tests

WP Star Reviews, Map, and Testimonials: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,909 ▲14813.88 ▼0.477.94 ▲6.1339.21 ▼3.37
Dashboard /wp-admin2,239 ▲595.66 ▼0.0084.72 ▼2.2744.37 ▲0.71
Posts /wp-admin/edit.php2,132 ▲322.51 ▲0.4851.19 ▲7.4640.81 ▲0.88
Add New Post /wp-admin/post-new.php2,344 ▲81623.28 ▲0.26621.86 ▼76.9749.57 ▼0.96
Media Library /wp-admin/upload.php1,419 ▲224.21 ▲0.1498.12 ▼12.0545.68 ▲0.36

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/contempo-reviews/includes/admin/ctpo_interface.php+251
    Trying to access array offset on value of type bool
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_latest_project
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% 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
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/contempo-reviews/includes/admin/styles.php
  • 11× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_list_comments() in wp-content/plugins/contempo-reviews/includes/review_template.php:4
    • > PHP Notice
      Undefined variable: shine_effect in wp-content/plugins/contempo-reviews/includes/admin/styles.php on line 103
    • > PHP Fatal error
      Uncaught Error: Class 'ContempoOptions' not found in wp-content/plugins/contempo-reviews/includes/admin/ctpo_gui.php:3
    • > PHP Notice
      Undefined variable: text_shadow in wp-content/plugins/contempo-reviews/includes/admin/styles.php on line 51
    • > PHP Notice
      Undefined variable: text_shadow in wp-content/plugins/contempo-reviews/includes/admin/styles.php on line 80
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/contempo-reviews/includes/testimonial_widget.php:3
    • > PHP Notice
      Undefined variable: text_shadow in wp-content/plugins/contempo-reviews/includes/admin/styles.php on line 35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/contempo-reviews/includes/testimonial_admin.php:17
    • > PHP Notice
      Undefined variable: text_shadow in wp-content/plugins/contempo-reviews/includes/admin/styles.php on line 96
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/contempo-reviews/ctpo-testimonials.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: seo reviews, comment system, testimonials, wordpress star reviews, review map

contempo-reviews/ctpo-testimonials.php 92% from 13 tests

The principal PHP file in "WP Star Reviews, Map, and Testimonials" v. 1.2 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("contempo-reviews.php" instead of "ctpo-testimonials.php")

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 plugin32,559 lines of code in 108 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript293,7583,77916,951
CSS604585647,292
SVG2002,779
PHP87352642,126
HTML35841,838
Stylus12546931
Markdown31410407
PO File195104223
JSON10012

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity17.67
▷ Minimum class complexity1.00
▷ Maximum class complexity36.00
Average method complexity3.08
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods37
▷ Static methods00.00%
▷ Public methods37100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
135 compressed PNG files occupy 1.33MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/admin/js/iCheck/skins/square/orange.png2.13KB1.83KB▼ 14.26%
includes/admin/js/iCheck/skins/flat/grey@2x.png3.67KB2.77KB▼ 24.49%
includes/admin/js/iCheck/skins/minimal/yellow.png1.11KB1.45KB0.00%
includes/admin/css/images/ui-icons_3d80b3_256x240.png4.44KB4.17KB▼ 6.02%
includes/admin/js/iCheck/skins/futurico/futurico@2x.png3.37KB2.51KB▼ 25.45%