72% smartlib-tools

Code Review | Smartlib Tools

WordPress plugin Smartlib Tools scored72%from 54 tests.

About plugin

  • Plugin page: smartlib-tools
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4
  • WordPress version: 6.3.1
  • First release: Aug 18, 2015
  • Latest release: Apr 21, 2020
  • Number of updates: 12
  • Update frequency: every 142.3 days
  • Top authors: netbiel (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /18,575 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.81MB] [CPU: ▲0.94ms] Passed 4 tests

Server-side resources used by Smartlib Tools
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.20 ▲0.7446.31 ▲3.22
Dashboard /wp-admin4.20 ▲0.8564.34 ▼3.71
Posts /wp-admin/edit.php4.25 ▲0.8961.42 ▲13.77
Add New Post /wp-admin/post-new.php6.73 ▲0.8498.33 ▲0.18
Media Library /wp-admin/upload.php4.02 ▲0.7947.10 ▲4.08
Add New /wp-admin/post-new.php?post_type=smartlib_faq4.2257.16
Add New /wp-admin/post-new.php?post_type=smartlib_portfolio4.2670.16
Team Members /wp-admin/edit.php?post_type=smartlib_team4.1055.32
Add New /wp-admin/post-new.php?post_type=smartlib_team4.2265.00
Testimonials /wp-admin/edit.php?post_type=smartlib_testimonial4.1052.66
Add New /wp-admin/post-new.php?post_type=smartlib_testimonial4.2465.92
Skills /wp-admin/edit-tags.php?taxonomy=portfolio_skills&post_type=smartlib_portfolio4.0452.55
Portfolio items /wp-admin/edit.php?post_type=smartlib_portfolio4.1054.07
FAQ /wp-admin/edit.php?post_type=smartlib_faq4.1047.45
Portfolio Category /wp-admin/edit-tags.php?taxonomy=portfolio_category&post_type=smartlib_portfolio4.0451.29

Server storage [IO: ▲2.15MB] [DB: ▲0.01MB] Passed 3 tests

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

Browser metrics Passed 4 tests

A check of browser resources used by Smartlib Tools
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,284 ▲53815.57 ▲1.275.51 ▲3.6243.83 ▲4.32
Dashboard /wp-admin2,591 ▲3856.79 ▲0.89131.46 ▲21.0746.13 ▲8.77
Posts /wp-admin/edit.php2,418 ▲3153.45 ▲1.4351.25 ▲8.5234.77 ▼0.47
Add New Post /wp-admin/post-new.php1,588 ▲4816.81 ▼6.42565.88 ▼141.7426.96 ▼25.60
Media Library /wp-admin/upload.php1,555 ▲1584.05 ▼0.1596.43 ▼14.0949.25 ▲0.73
Add New /wp-admin/post-new.php?post_type=smartlib_faq2,3517.97172.9464.66
Add New /wp-admin/post-new.php?post_type=smartlib_portfolio2,6548.43228.8266.10
Team Members /wp-admin/edit.php?post_type=smartlib_team1,3853.3548.5827.79
Add New /wp-admin/post-new.php?post_type=smartlib_team2,3887.88187.0758.71
Testimonials /wp-admin/edit.php?post_type=smartlib_testimonial1,3793.3458.7234.78
Add New /wp-admin/post-new.php?post_type=smartlib_testimonial2,4577.91176.5559.59
Skills /wp-admin/edit-tags.php?taxonomy=portfolio_skills&post_type=smartlib_portfolio1,5643.2952.4036.80
Portfolio items /wp-admin/edit.php?post_type=smartlib_portfolio1,3883.4352.1532.37
FAQ /wp-admin/edit.php?post_type=smartlib_faq1,3863.4444.0226.75
Portfolio Category /wp-admin/edit-tags.php?taxonomy=portfolio_category&post_type=smartlib_portfolio1,5893.2651.9736.68

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% 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
Please fix the following
  • 7× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/smartlib-tools/vendor/shortcode-ui/inc/templates/media-frame.tpl.php
    • > /wp-content/plugins/smartlib-tools/vendor/shortcode-ui/inc/templates/list-item.tpl.php
    • > /wp-content/plugins/smartlib-tools/vendor/meta-box/inc/templates/media.php
    • > /wp-content/plugins/smartlib-tools/vendor/meta-box/inc/templates/upload.php
    • > /wp-content/plugins/smartlib-tools/vendor/meta-box/inc/templates/video.php
    • > /wp-content/plugins/smartlib-tools/vendor/meta-box/inc/templates/image-advanced.php
    • > /wp-content/plugins/smartlib-tools/vendor/meta-box/inc/templates/audio.php
  • 79× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_File_Field' not found in wp-content/plugins/smartlib-tools/vendor/meta-box/inc/fields/media.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Object_Choice_Field' not found in wp-content/plugins/smartlib-tools/vendor/meta-box/inc/fields/user.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/smartlib-tools/includes/shortcodes.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/smartlib-tools/vendor/bootstrap-for-contact-form-7/modules/submit.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Taxonomy_Field' not found in wp-content/plugins/smartlib-tools/vendor/meta-box/inc/fields/taxonomy-advanced.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'CF7BS_Component' not found in wp-content/plugins/smartlib-tools/vendor/bootstrap-for-contact-form-7/classes/CF7BS_Form_Field.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Object_Choice_Field' not found in wp-content/plugins/smartlib-tools/vendor/meta-box/inc/fields/post.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Text_Field' not found in wp-content/plugins/smartlib-tools/vendor/meta-box/inc/fields/datetime.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'CF7BS_Component' not found in wp-content/plugins/smartlib-tools/vendor/bootstrap-for-contact-form-7/classes/CF7BS_Alert.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Input_Field' not found in wp-content/plugins/smartlib-tools/vendor/meta-box/inc/fields/checkbox.php:11

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=portfolio_category&post_type=smartlib_portfolio
    • > Javascript (severe) in unknown
    /wp-content/plugins/smartlib-tools//assets/js/plugin-scripts.js?ver=1.0 4:42 Uncaught TypeError: jQuery(...).live is not a function

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: team member, portfolio, faq, social buttons, post types...

smartlib-tools/smartlib-tools.php Passed 13 tests

The entry point to "Smartlib Tools" version 1.0.7 is a PHP file that has certain tags in its header comment area
92 characters long description:
Some extra features to your theme: Portfolio, Testimonials, FAQ and Team Members Post Types.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin23,240 lines of code in 286 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1141,9581,4327,198
PHP1121,5953,3767,081
CSS367411416,429
PO File166537401,754
SVG100504
Sass3440197
JSON21058
Markdown215019

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Please fix the following
  • Method cyclomatic complexity should be reduced to less than 100 (currently 138)
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity8.72
▷ Minimum class complexity1.00
▷ Maximum class complexity151.00
Average method complexity2.61
▷ Minimum method complexity1.00
▷ Maximum method complexity138.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes78
▷ Abstract classes810.26%
▷ Concrete classes7089.74%
▷ Final classes00.00%
Methods383
▷ Static methods24263.19%
▷ Public methods34088.77%
▷ Protected methods277.05%
▷ Private methods164.18%
Functions88
▷ Named functions8697.73%
▷ Anonymous functions22.27%
Constants15
▷ Global constants15100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
21 PNG files occupy 0.15MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/meta-box/img/jqueryui/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
vendor/shortcode-ui/screenshot-1.png29.92KB18.14KB▼ 39.38%
vendor/shortcode-ui/screenshot-3.png17.79KB10.38KB▼ 41.67%
vendor/meta-box/img/jqueryui/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
vendor/meta-box/img/jqueryui/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%