84% gc-testimonials-to-testimonials

Code Review | GC Testimonials to Testimonials Widget

WordPress plugin GC Testimonials to Testimonials Widget scored84%from 54 tests.

About plugin

  • Plugin page: gc-testimonials-t...
  • Plugin version: 1.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.2-4.3.0
  • WordPress version: 6.3.1
  • First release: Dec 1, 2013
  • Latest release: Jun 26, 2015
  • Number of updates: 21
  • Update frequency: every 27.2 days
  • Top authors: comprock (90.48%)saurabhd (14.29%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,570 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.57ms] Passed 4 tests

Analyzing server-side resources used by GC Testimonials to Testimonials Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.11 ▼2.08
Dashboard /wp-admin3.31 ▲0.0049.47 ▼1.61
Posts /wp-admin/edit.php3.36 ▲0.0050.21 ▼1.44
Add New Post /wp-admin/post-new.php5.89 ▲0.0098.11 ▼9.14
Media Library /wp-admin/upload.php3.23 ▲0.0033.97 ▼0.91

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 32 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for GC Testimonials to Testimonials Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.73 ▲0.381.99 ▲0.4043.99 ▲2.61
Dashboard /wp-admin2,192 ▲215.66 ▼0.0091.76 ▼8.5341.84 ▼2.30
Posts /wp-admin/edit.php2,100 ▼32.00 ▲0.0640.61 ▲3.4838.03 ▼0.48
Add New Post /wp-admin/post-new.php1,531 ▲522.99 ▼0.49690.42 ▲4.5055.02 ▲5.10
Media Library /wp-admin/upload.php1,397 ▼04.19 ▲0.0297.65 ▼1.4047.64 ▲2.67

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% 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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 10× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      require_once(): Failed opening required 'GCT2T_DIR_LIB_ALTaihrus-framework/includes/class-aihrus-settings.php' (include_path='.:/usr/share/php') in wp-content/plugins/gc-testimonials-to-testimonials/includes/class-gc-testimonials-to-testimonials-settings.php on line 25
    • > PHP Warning
      Use of undefined constant GCT2T_DIR_LIB_ALT - assumed 'GCT2T_DIR_LIB_ALT' (this will throw an Error in a future version of PHP) in wp-content/plugins/gc-testimonials-to-testimonials/includes/class-gc-testimonials-to-testimonials-settings.php on line 25
    • > PHP Warning
      require_once(GCT2T_DIR_LIB_ALTaihrus-framework/includes/class-aihrus-common.php): failed to open stream: No such file or directory in wp-content/plugins/gc-testimonials-to-testimonials/includes/class-gc-testimonials-to-testimonials.php on line 16
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/gc-testimonials-to-testimonials/includes/requirements.php on line 19
    • > PHP Warning
      require_once(GCT2T_DIR_LIB_ALTaihrus-framework/includes/class-aihrus-settings.php): failed to open stream: No such file or directory in wp-content/plugins/gc-testimonials-to-testimonials/includes/class-gc-testimonials-to-testimonials-settings.php on line 25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/gc-testimonials-to-testimonials/gc-testimonials-to-testimonials.php:29
    • > PHP Fatal error
      require_once(): Failed opening required 'GCT2T_DIR_LIB_ALTaihrus-framework/includes/class-aihrus-common.php' (include_path='.:/usr/share/php') in wp-content/plugins/gc-testimonials-to-testimonials/includes/class-gc-testimonials-to-testimonials.php on line 16
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/gc-testimonials-to-testimonials/includes/requirements.php on line 19
    • > PHP Warning
      Use of undefined constant GCT2T_DIR_LIB_ALT - assumed 'GCT2T_DIR_LIB_ALT' (this will throw an Error in a future version of PHP) in wp-content/plugins/gc-testimonials-to-testimonials/includes/class-gc-testimonials-to-testimonials.php on line 16
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/gc-testimonials-to-testimonials/includes/requirements.php on line 19

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 Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: gc testimonials, convert, testimonials, migration, testimonials widget

gc-testimonials-to-testimonials/gc-testimonials-to-testimonials.php Passed 13 tests

The main PHP script in "GC Testimonials to Testimonials Widget" version 1.3.1 is automatically included on every request by WordPress
74 characters long description:
Migrate GC Testimonials entries to Testimonials Widgets custom post types.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin1,621 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP5318229872
CSS22034450
Markdown4730201
JavaScript1272098

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity24.00
▷ Minimum class complexity9.00
▷ Maximum class complexity47.00
Average method complexity2.57
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods44
▷ Static methods3579.55%
▷ Public methods44100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants20
▷ Global constants1365.00%
▷ Class constants735.00%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
15 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/redmond/images/ui-icons_469bdd_256x240.png4.44KB4.17KB▼ 6.02%
assets/css/redmond/images/ui-bg_inset-hard_100_fcfdfd_1x100.png0.29KB0.10KB▼ 65.41%
assets/css/redmond/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png5.69KB2.08KB▼ 63.46%
assets/css/redmond/images/ui-icons_f9bd01_256x240.png4.44KB4.17KB▼ 6.02%
assets/css/redmond/images/ui-bg_glass_75_d0e5f5_1x400.png0.33KB0.16KB▼ 52.38%