84% theme-toolkit

Code Review | Theme Toolkit

WordPress plugin Theme Toolkit scored84%from 54 tests.

About plugin

  • Plugin page: theme-toolkit
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.2.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8.5-4.9.4
  • WordPress version: 6.3.1
  • First release: Oct 30, 2017
  • Latest release: Mar 26, 2018
  • Number of updates: 6
  • Update frequency: every 24.7 days
  • Top authors: preciousthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /5,977 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.35MB] [CPU: ▼3.68ms] Passed 4 tests

Server-side resources used by Theme Toolkit
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.82 ▲0.3642.77 ▲1.18
Dashboard /wp-admin3.64 ▲0.3448.66 ▼2.91
Posts /wp-admin/edit.php3.76 ▲0.4056.25 ▼4.48
Add New Post /wp-admin/post-new.php6.23 ▲0.3487.18 ▼8.50
Media Library /wp-admin/upload.php3.57 ▲0.3435.11 ▲3.20
Add New /wp-admin/post-new.php?post_type=tt-testimonials3.6848.33
All Items /wp-admin/edit.php?post_type=tt-testimonials3.6136.77
All Items /wp-admin/edit.php?post_type=tt-team3.6136.95
Categories /wp-admin/edit-tags.php?taxonomy=tt-categories&post_type=tt-portfolio3.5634.25
Add New /wp-admin/post-new.php?post_type=tt-portfolio3.6851.26
Add New /wp-admin/post-new.php?post_type=tt-team3.6246.45
Add New /wp-admin/post-new.php?post_type=tt-partners3.6245.93
All Items /wp-admin/edit.php?post_type=tt-portfolio3.6138.72
All Items /wp-admin/edit.php?post_type=tt-partners3.6134.87

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 25 new files
Database: no new tables, 10 new options
New WordPress options
widget_recent-comments
widget_theme-toolkit-testimonials
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_theme-toolkit-portfolio
widget_theme-toolkit-team
widget_theme-toolkit-partners
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Theme Toolkit
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,036 ▲29013.54 ▼0.848.98 ▲7.0742.79 ▼2.89
Dashboard /wp-admin2,318 ▲1305.97 ▲1.1197.08 ▼16.9438.72 ▼4.80
Posts /wp-admin/edit.php2,201 ▲1092.03 ▲0.0337.15 ▼3.5833.20 ▼0.03
Add New Post /wp-admin/post-new.php1,628 ▲9523.44 ▲0.51717.82 ▲91.5455.73 ▼0.45
Media Library /wp-admin/upload.php1,500 ▲1124.23 ▼0.0394.69 ▼7.8041.27 ▼1.42
Add New /wp-admin/post-new.php?post_type=tt-testimonials2,2387.80165.4568.13
All Items /wp-admin/edit.php?post_type=tt-testimonials1,1651.9530.6534.43
All Items /wp-admin/edit.php?post_type=tt-team1,1651.9429.7630.01
Categories /wp-admin/edit-tags.php?taxonomy=tt-categories&post_type=tt-portfolio1,3772.1425.6426.99
Add New /wp-admin/post-new.php?post_type=tt-portfolio2,3647.74160.0253.05
Add New /wp-admin/post-new.php?post_type=tt-team1,8393.8061.9932.62
Add New /wp-admin/post-new.php?post_type=tt-partners1,7503.5163.4530.49
All Items /wp-admin/edit.php?post_type=tt-portfolio1,1791.9330.6731.08
All Items /wp-admin/edit.php?post_type=tt-partners1,1651.9930.9731.68

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 10 options
    • widget_theysaidso_widget
    • widget_theme-toolkit-team
    • widget_recent-posts
    • widget_theme-toolkit-portfolio
    • widget_theme-toolkit-testimonials
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theme-toolkit-partners

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 8× 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-toolkit/team/team.php:61
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/theme-toolkit/testimonials/testimonials.php:61
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/theme-toolkit/portfolio/portfolio.php:61
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/theme-toolkit/portfolio/portfolio-widget.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/theme-toolkit/testimonials/testimonials-widget.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/theme-toolkit/team/team-widget.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/theme-toolkit/partners/partners-widget.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/theme-toolkit/partners/partners.php:61

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
7 plugin tags: theme, custom fields, metaboxes, extension, custom post type...

theme-toolkit/theme-toolkit.php 92% from 13 tests

This is the main PHP file of "Theme Toolkit" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 220 characters long)

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
Everything looks great! No dangerous files found in this plugin6,682 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
CSS3126322,772
SVG1002,671
PHP10462731,200
JavaScript281139

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity15.60
▷ Minimum class complexity3.00
▷ Maximum class complexity24.00
Average method complexity3.61
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods28
▷ Static methods13.57%
▷ Public methods2485.71%
▷ Protected methods00.00%
▷ Private methods414.29%
Functions24
▷ Named functions24100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
There are no PNG files in this plugin