78% alpharage-testimonials

Code Review | WP Client Testimonials

WordPress plugin WP Client Testimonials scored78%from 54 tests.

About plugin

  • Plugin page: alpharage-testimo...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.6-4.9.6
  • WordPress version: 6.3.1
  • First release: Jul 2, 2018
  • Latest release: Jul 6, 2018
  • Number of updates: 11
  • Update frequency: every 0.6 days
  • Top authors: alpharages (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /746 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.21MB] [CPU: ▼5.54ms] Passed 4 tests

Analyzing server-side resources used by WP Client Testimonials
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2135.47 ▼7.41
Dashboard /wp-admin3.51 ▲0.2145.90 ▼0.37
Posts /wp-admin/edit.php3.62 ▲0.2747.66 ▲0.97
Add New Post /wp-admin/post-new.php6.09 ▲0.2185.84 ▼13.32
Media Library /wp-admin/upload.php3.43 ▲0.2036.24 ▼1.07
Alpha Testimonials /wp-admin/edit.php?post_type=alprt_testimonial3.4736.80
Add New /wp-admin/post-new.php?post_type=alprt_testimonial3.5651.12
Testimonial Category /wp-admin/edit-tags.php?taxonomy=alprt-testicat&post_type=alprt_testimonial3.4235.40
Testimonial Help /wp-admin/edit.php?post_type=alprt_testimonial&page=testi-help3.4033.14

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Client Testimonials
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,868 ▲12213.33 ▼1.121.98 ▲0.2739.11 ▲0.33
Dashboard /wp-admin2,245 ▲705.85 ▲0.90101.86 ▼20.0269.05 ▲24.14
Posts /wp-admin/edit.php2,131 ▲392.02 ▼0.0138.24 ▼1.9333.86 ▼4.20
Add New Post /wp-admin/post-new.php1,550 ▲3123.23 ▼0.11745.06 ▲88.2650.01 ▼1.43
Media Library /wp-admin/upload.php1,424 ▲364.28 ▲0.0998.81 ▼1.9372.26 ▲28.95
Alpha Testimonials /wp-admin/edit.php?post_type=alprt_testimonial1,1141.9432.6229.00
Add New /wp-admin/post-new.php?post_type=alprt_testimonial2,4237.71173.44127.45
Testimonial Category /wp-admin/edit-tags.php?taxonomy=alprt-testicat&post_type=alprt_testimonial1,3012.1526.1732.21
Testimonial Help /wp-admin/edit.php?post_type=alprt_testimonial&page=testi-help1,0832.1526.6562.22

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

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 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
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/alpharage-testimonials/admin/partials/alpharage-testimonials-post-type.php:182
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/alpharage-testimonials/admin/partials/alpharage-testimonials-shortcode-builder.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'ALPRT_testimonials_Public' not found in wp-content/plugins/alpharage-testimonials/public/partials/alpharage-testimonials-public-display.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/alpharage-testimonials/alpharage-testimonials.php:43
    • > PHP Fatal error
      Uncaught Error: Class 'ALPRT_testimonials_Admin' not found in wp-content/plugins/alpharage-testimonials/admin/partials/alpharage-testimonials-menu-page.php:7

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/post-new.php?post_type=alprt_testimonial
    • > Network (severe)
    wp-content/plugins/alpharage-testimonials/admin/js/alpharage-testimonials-admin.js?wp-mce-49110-20201110 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #4 (**Shortcode Builder Icon** - Click on the highlighted icon to generate testimonials shortcode.), #5 (**Shortcode Builder Form** - User can add shortcode in page/post after specifying required values in form.), #6 (**Settings** - Users can change color options of Testimonials Through Shortcode Popup.)
The official readme.txt is a good inspiration

alpharage-testimonials/alpharage-testimonials.php Passed 13 tests

The primary PHP file in "WP Client Testimonials" version 1.0.0 is used by WordPress to initiate all plugin functionality
97 characters long description:
WP Client Testimonials is an awesome full featured plugin for managing testimonials on your site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin12,907 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
CSS71,4732911,227
PHP14227573842
SVG201691
JavaScript41719147

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity4.45
▷ Minimum class complexity1.00
▷ Maximum class complexity22.00
Average method complexity1.70
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods54
▷ Static methods23.70%
▷ Public methods4990.74%
▷ Protected methods00.00%
▷ Private methods59.26%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
7 PNG files occupy 0.36MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/visualicon.png3.70KB1.42KB▼ 61.74%
admin/review.png0.67KB0.60KB▼ 10.45%
admin/images/img01.png302.27KB165.62KB▼ 45.21%
admin/images/img02.png22.69KB8.82KB▼ 61.15%
admin/images/visual-toolbar.png6.16KB3.72KB▼ 39.61%