73% itech-doc

Code Review | iTech Doc

WordPress plugin iTech Doc scored73%from 54 tests.

About plugin

  • Plugin page: itech-doc
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8
  • WordPress version: 6.3.1
  • First release: Aug 16, 2021
  • Latest release: Aug 16, 2021
  • Number of updates: 3
  • Update frequency: every 1.7 days
  • Top authors: itechtheme (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /308 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.60MB] [CPU: ▲12.59ms] Passed 4 tests

This is a short check of server-side resources used by iTech Doc
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /5.05 ▲1.6058.77 ▲14.78
Dashboard /wp-admin4.90 ▲1.6059.83 ▲9.73
Posts /wp-admin/edit.php5.01 ▲1.6566.42 ▲17.10
Add New Post /wp-admin/post-new.php7.58 ▲1.70101.32 ▲15.74
Media Library /wp-admin/upload.php4.79 ▲1.5744.90 ▲10.10
Categories /wp-admin/edit-tags.php?taxonomy=catrgory&post_type=doc4.8249.12
Add New /wp-admin/post-new.php?post_type=doc7.6696.11
iTech Docs /wp-admin/edit.php?post_type=doc4.8650.14

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 493 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

iTech Doc: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,229 ▲49419.01 ▲4.719.15 ▲7.1740.53 ▼10.26
Dashboard /wp-admin2,506 ▲3189.24 ▲3.38185.03 ▲80.3443.37 ▲0.58
Posts /wp-admin/edit.php2,412 ▲3206.08 ▲4.0379.71 ▲36.8335.18 ▼2.17
Add New Post /wp-admin/post-new.php1,612 ▲9819.97 ▲2.52737.33 ▲45.6438.01 ▼14.29
Media Library /wp-admin/upload.php1,554 ▲1666.63 ▲2.41109.08 ▲10.5542.77 ▲0.69
Categories /wp-admin/edit-tags.php?taxonomy=catrgory&post_type=doc1,6045.9168.6530.53
Add New /wp-admin/post-new.php?post_type=doc2,03120.89994.7044.70
iTech Docs /wp-admin/edit.php?post_type=doc1,4246.0870.8129.67

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, 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
Please fix the following items
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/itech-doc/vendor/htmlburger/carbon-fields/templates/Exception/incorrect-syntax.php
    • > /wp-content/plugins/itech-doc/public/partials/itech-doc-public-display.php
    • > /wp-content/plugins/itech-doc/admin/partials/itech-doc-admin-display.php
  • 116× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Carbon_Fields\\Event\\Listener' not found in wp-content/plugins/itech-doc/vendor/htmlburger/carbon-fields/core/Event/PersistentListener.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\User_Capability_Condition' not found in wp-content/plugins/itech-doc/vendor/htmlburger/carbon-fields/core/Container/Condition/Current_User_Capability_Condition.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Condition' not found in wp-content/plugins/itech-doc/vendor/htmlburger/carbon-fields/core/Container/Condition/Boolean_Condition.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Field' not found in wp-content/plugins/itech-doc/vendor/htmlburger/carbon-fields/core/Field/Checkbox_Field.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/itech-doc/public/doc/tax.php:33
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/itech-doc/vendor/htmlburger/carbon-fields/core/Widget/Widget.php:13
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/itech-doc/vendor/htmlburger/carbon-fields/templates/Container/common/options-page.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Service\\Service' not found in wp-content/plugins/itech-doc/vendor/htmlburger/carbon-fields/core/Service/Legacy_Storage_Service_v_1_5.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Select_Field' not found in wp-content/plugins/itech-doc/vendor/htmlburger/carbon-fields/core/Field/Gravity_Form_Field.php:8
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/itech-doc/vendor/htmlburger/carbon-fields/templates/Container/user_meta.php:1

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
    • > GET request to /wp-admin/post-new.php?post_type=doc
    • > Console-api (warning) in wp-includes/js/dist/deprecated.min.js?ver=73ad3591e7bc95f4777a+1:627
    wp.compose.withState is deprecated since version 5.8. Please use wp.element.useState instead.

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (Setting Page), #2 (Product Archive Page), #3 (Single Product Page)
You can look at the official readme.txt

itech-doc/itech-doc.php Passed 13 tests

"iTech Doc" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
96 characters long description:
This is a short description of what the plugin does. It's displayed in the WordPress admin area.

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
There were no executable files found in this plugin31,411 lines of code in 429 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1765,1988,51512,958
PHP1592,6077,0339,008
CSS154161,1943,941
PO File217048891,874
Sass4833401,746
SVG4001,461
JSON300355
Markdown324068

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity7.86
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity2.01
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces22
Interfaces5
Traits0
Classes128
▷ Abstract classes118.59%
▷ Concrete classes11791.41%
▷ Final classes10.85%
Methods913
▷ Static methods9210.08%
▷ Public methods73980.94%
▷ Protected methods16518.07%
▷ Private methods90.99%
Functions110
▷ Named functions3027.27%
▷ Anonymous functions8072.73%
Constants29
▷ Global constants620.69%
▷ Class constants2379.31%
▷ Public constants23100.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.07MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
public/template/images/download.png67.62KB27.51KB▼ 59.31%