84% ithoughts-html-snippets

Code Review | iThoughts HTML Snippets

WordPress plugin iThoughts HTML Snippets scored84%from 54 tests.

About plugin

  • Plugin page: ithoughts-html-sn...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.7.0
  • WordPress version: 6.3.1
  • First release: Jan 28, 2016
  • Latest release: Dec 12, 2016
  • Number of updates: 5
  • Update frequency: every 63.8 days
  • Top authors: Gerkin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /980 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.17MB] [CPU: ▼5.49ms] Passed 4 tests

Server-side resources used by iThoughts HTML Snippets
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1434.65 ▼8.70
Dashboard /wp-admin3.50 ▲0.1544.52 ▼11.39
Posts /wp-admin/edit.php3.61 ▲0.2546.64 ▼4.22
Add New Post /wp-admin/post-new.php6.08 ▲0.1998.63 ▲2.34
Media Library /wp-admin/upload.php3.42 ▲0.1937.37 ▲3.24
Add a HTML Snippet /wp-admin/post-new.php?post_type=html_snippet3.4744.93
HTML Snippets /wp-admin/edit.php?post_type=html_snippet3.4634.98

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 39 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by iThoughts HTML Snippets
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,872 ▲10113.24 ▼1.341.84 ▼0.0141.13 ▼6.15
Dashboard /wp-admin2,278 ▲875.84 ▲0.95101.86 ▼1.3676.06 ▲32.48
Posts /wp-admin/edit.php2,164 ▲752.19 ▲0.1439.74 ▼1.8634.04 ▼0.48
Add New Post /wp-admin/post-new.php1,423 ▼9618.57 ▼4.32607.82 ▲18.6162.24 ▲10.96
Media Library /wp-admin/upload.php1,454 ▲664.23 ▲0.03111.07 ▲12.4252.84 ▲11.14
Add a HTML Snippet /wp-admin/post-new.php?post_type=html_snippet1,9283.9572.35107.22
HTML Snippets /wp-admin/edit.php?post_type=html_snippet1,1222.0131.3629.08

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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
The following issues need your attention
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'ithoughts\\v1_0\\Singleton' not found in wp-content/plugins/ithoughts-html-snippets/class/Admin.class.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'ithoughts\\v4_0\\Backbone' not found in wp-content/plugins/ithoughts-html-snippets/class/Backbone.class.php:17

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Tags: Too many tags (14 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

ithoughts-html-snippets/ithoughts_html_snippets.php 92% from 13 tests

The main file in "iThoughts HTML Snippets" v. 1.0.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("ithoughts-html-snippets.php" instead of "ithoughts_html_snippets.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin1,912 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
PHP10145521731
JavaScript1252379606
JSON200239
SVG222170
PO File23136105
XML20156
Markdown1205

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity21.57
▷ Minimum class complexity1.00
▷ Maximum class complexity91.00
Average method complexity3.82
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces3
Interfaces1
Traits0
Classes6
▷ Abstract classes466.67%
▷ Concrete classes233.33%
▷ Final classes00.00%
Methods53
▷ Static methods1630.19%
▷ Public methods4890.57%
▷ Protected methods23.77%
▷ Private methods35.66%
Functions1
▷ Named functions1100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
resources/icon-tinymce.png1.72KB1.30KB▼ 24.66%