74% testimonials-wp

Code Review | Testimonials WP

WordPress plugin Testimonials WP scored74%from 54 tests.

About plugin

  • Plugin page: testimonials-wp
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0.10+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.6-5.1
  • WordPress version: 6.3.1
  • First release: Feb 21, 2019
  • Latest release: Mar 2, 2019
  • Number of updates: 4
  • Update frequency: every 2.3 days
  • Top authors: second2none (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /558 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.16MB] [CPU: ▼2.71ms] Passed 4 tests

An overview of server-side resources used by Testimonials WP
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1542.31 ▲1.52
Dashboard /wp-admin3.47 ▲0.1749.28 ▼7.01
Posts /wp-admin/edit.php3.58 ▲0.2352.16 ▼4.28
Add New Post /wp-admin/post-new.php6.05 ▲0.1797.16 ▲1.73
Media Library /wp-admin/upload.php3.39 ▲0.1740.80 ▼1.05

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 30 new files
Database: 1 new table, 8 new options
New tables
wp_testimonials_wp
New WordPress options
twp_display_settings
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
twp_settings
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Testimonials WP
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,946 ▲18514.00 ▼0.405.92 ▲4.1939.95 ▼2.58
Dashboard /wp-admin2,237 ▲345.88 ▲0.07100.43 ▼10.8238.16 ▼7.03
Posts /wp-admin/edit.php2,116 ▲162.06 ▼0.0038.31 ▼0.6936.49 ▼4.64
Add New Post /wp-admin/post-new.php1,558 ▲2723.40 ▲0.25643.96 ▲6.5457.18 ▲7.91
Media Library /wp-admin/upload.php1,416 ▲164.18 ▲0.03158.47 ▲41.9159.07 ▲10.10

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_testimonials_wp
  • This plugin does not fully uninstall, leaving 8 options in the database
    • db_upgraded
    • twp_display_settings
    • twp_settings
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not 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 fix the following items
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/testimonials-wp/php_libraries/twp_tables_class.php on line 5
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/testimonials-wp/php_libraries/twp_tables_class.php on line 5
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/testimonials-wp/php_libraries/twp_tables_class.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/testimonials-wp/options.php:781

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 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: user reviews, wordpress testimonials, testimonials, customer reviews, reviews

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

The entry point to "Testimonials WP" version 1.0.0 is a PHP file that has certain tags in its header comment area
130 characters long description:
Customizable plugin that creates and displays your testimonials with shortcodes. Create the testimonials as an Admin or as a User.

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
Good job! No executable or dangerous file extensions detected3,218 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP5150171,460
Sass2280741
CSS21892737
JavaScript2300280

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity30.00
▷ Minimum class complexity7.00
▷ Maximum class complexity43.00
Average method complexity2.71
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods51
▷ Static methods00.00%
▷ Public methods4588.24%
▷ Protected methods00.00%
▷ Private methods611.76%
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
11 PNG files occupy 0.44MB with 0.29MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png9.65KB3.17KB▼ 67.15%
assets/screenshot-5.png21.24KB8.73KB▼ 58.90%
images/default-profile.png6.23KB1.52KB▼ 75.54%
assets/banner-772x250.png13.81KB4.39KB▼ 68.20%
assets/screenshot-7.png149.91KB57.59KB▼ 61.58%