78% patterns-kit

Code Review | Patterns Kit

WordPress plugin Patterns Kit scored78%from 54 tests.

About plugin

  • Plugin page: patterns-kit
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: Feb 28, 2023
  • Latest release: Apr 17, 2023
  • Number of updates: 9
  • Update frequency: every 5.3 days
  • Top authors: sparklewpthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

4,000+ active /16,708 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Patterns Kit
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.94 ▲1.4850.60 ▲10.24
Dashboard /wp-admin4.78 ▲1.4458.78 ▼6.76
Posts /wp-admin/edit.php4.83 ▲1.4851.81 ▲7.17
Add New Post /wp-admin/post-new.php7.38 ▲1.5087.32 ▼14.40
Media Library /wp-admin/upload.php4.71 ▲1.4844.83 ▲12.22

Server storage [IO: ▲33.02MB] [DB: ▲0.00MB] 67% from 3 tests

Input-output and database impact of this plugin
These are issues you should consider
  • Try to limit filesystem usage to 25MB (currently using 33.02MB)
Filesystem: 270 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Patterns Kit
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,908 ▲13713.99 ▼0.388.75 ▲6.5744.69 ▲1.35
Dashboard /wp-admin2,203 ▲124.86 ▼0.05111.79 ▲0.6144.23 ▼8.01
Posts /wp-admin/edit.php2,089 ▼02.05 ▼0.0134.77 ▼4.0232.68 ▼4.78
Add New Post /wp-admin/post-new.php1,520 ▼1323.19 ▲0.16687.25 ▲16.2358.98 ▲10.26
Media Library /wp-admin/upload.php1,382 ▼64.20 ▼0.0294.84 ▼8.8243.62 ▼0.91

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
The following issues need your attention
  • 36× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/patterns-kit/patterns/about/general/about-1.php
    • > /wp-content/plugins/patterns-kit/patterns/services/10.php
    • > /wp-content/plugins/patterns-kit/patterns/about/general/about-7.php
    • > /wp-content/plugins/patterns-kit/patterns/about/general/about-6.php
    • > /wp-content/plugins/patterns-kit/patterns/contact-us/contact1.php
    • > /wp-content/plugins/patterns-kit/patterns/sucess-counter/counter2.php
    • > /wp-content/plugins/patterns-kit/patterns/about/general/about-2.php
    • > /wp-content/plugins/patterns-kit/patterns/progress-bar/progress-3.php
    • > /wp-content/plugins/patterns-kit/patterns/sidebar.php
    • > /wp-content/plugins/patterns-kit/patterns/accordion/accordian-1.php
  • 82× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/patterns-kit/patterns/hero/hero-5.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/patterns-kit/patterns/about/fse/about-us.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/patterns-kit/patterns/testimonials/testimonial-1.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/patterns-kit/patterns/hero/hero-1.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/patterns-kit/patterns/trainers.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/patterns-kit/patterns/teams/team-4.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/patterns-kit/patterns/contact-us/contact.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/patterns-kit/patterns/about/general/about-11.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/patterns-kit/patterns/hero/hero-4.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/patterns-kit/patterns/planning.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
2 plugin tags: patterns, pattern

patterns-kit/plugins.php 92% from 13 tests

The main PHP file in "Patterns Kit" ver. 1.0.3 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("patterns-kit.php" instead of "plugins.php")

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
Good job! No executable or dangerous file extensions detected10,903 lines of code in 112 files:
LanguageFilesBlank linesComment linesLines of code
PHP1071,70672510,395
CSS28325428
JavaScript219552
SVG10028

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.03
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
90 PNG files occupy 26.61MB with 6.65MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon-1.png0.94KB0.98KB0.00%
assets/images/teams/tam-it-1.png400.49KB324.85KB▼ 18.89%
assets/images/services/service-handyman-3.png719.40KB325.43KB▼ 54.76%
assets/images/counter/counter-2.png3.44KB1.67KB▼ 51.36%
assets/images/icon-5.png0.89KB0.93KB0.00%