10% theme-junkie-testimonials-content

Code Review | Theme Junkie Testimonials Content

WordPress plugin Theme Junkie Testimonials Content scored10%from 54 tests.

About plugin

  • Plugin page: theme-junkie-test...
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-6.1
  • WordPress version: 6.3.1
  • First release: Apr 30, 2014
  • Latest release: Oct 26, 2022
  • Number of updates: 7
  • Update frequency: every 443.1 days
  • Top authors: themejunkie (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /3,329 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'activation' not found or invalid function name

Server metrics [RAM: ▼1.61MB] [CPU: ▼51.01ms] Passed 4 tests

Analyzing server-side resources used by Theme Junkie Testimonials Content
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.39 ▼1.0710.39 ▼32.94
Dashboard /wp-admin2.40 ▼0.9411.73 ▼52.19
Posts /wp-admin/edit.php2.40 ▼0.9511.52 ▼35.28
Add New Post /wp-admin/post-new.php2.40 ▼3.4812.44 ▼83.64
Media Library /wp-admin/upload.php2.40 ▼0.8311.86 ▼23.56
Testimonials /wp-admin/edit.php?post_type=testimonial2.4015.44
Add New /wp-admin/post-new.php?post_type=testimonial2.4014.07

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Theme Junkie Testimonials Content
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲8413.32 ▼1.034.44 ▲2.6537.86 ▼6.51
Dashboard /wp-admin2,233 ▲415.82 ▲0.8095.74 ▼13.2041.27 ▼1.38
Posts /wp-admin/edit.php2,116 ▲272.03 ▼0.0235.63 ▼0.5034.95 ▼0.12
Add New Post /wp-admin/post-new.php1,537 ▲2317.53 ▲0.08606.27 ▼65.7550.76 ▲2.97
Media Library /wp-admin/upload.php1,415 ▲304.20 ▲0.0693.33 ▼17.3939.89 ▼6.45
Testimonials /wp-admin/edit.php?post_type=testimonial1,2813.3847.2827.78
Add New /wp-admin/post-new.php?post_type=testimonial2,3317.66165.1561.12

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in Tj_Testimonials_Widget is deprecated since version 4.3.0! Use __construct() instead.
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • widget_tjtsc-widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=testimonial
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in Tj_Testimonials_Widget is deprecated since version 4.3.0! Use __construct() instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=testimonial
    • > Notice in wp-content/plugins/theme-junkie-testimonials-content/admin/admin.php+70
    Trying to get property 'ID' of non-object

SRP 50% 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
  • 7× 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/theme-junkie-testimonials-content/inc/post-type.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/theme-junkie-testimonials-content/inc/extras.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/theme-junkie-testimonials-content/inc/widget.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/theme-junkie-testimonials-content/admin/metabox.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/theme-junkie-testimonials-content/inc/shortcode.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/theme-junkie-testimonials-content/inc/messages.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/theme-junkie-testimonials-content/admin/admin.php:13

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #1 (Testimonials screen), #2 (Meta boxes), #3 (Widget)
The official readme.txt is a good inspiration

theme-junkie-testimonials-content/tj-testimonials-content.php 92% from 13 tests

Analyzing the main PHP file in "Theme Junkie Testimonials Content" version 0.1.0
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("theme-junkie-testimonials-content.php" instead of "tj-testimonials-content.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
Everything looks great! No dangerous files found in this plugin572 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP9175352398
PO File14951127
JavaScript1141727
CSS13020

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity3.00
▷ Minimum class complexity2.00
▷ Maximum class complexity4.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 compressed PNG files occupy 0.03MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png7.57KB7.59KB0.00%
screenshot-2.png6.99KB7.07KB0.00%
screenshot-1.png20.21KB19.56KB▼ 3.22%