90% web3-smart-contracts

Code Review | Web3 Smart Contracts

WordPress plugin Web3 Smart Contracts scored90%from 54 tests.

About plugin

  • Plugin page: web3-smart-contracts
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-6.3
  • WordPress version: 6.3.1
  • First release: Nov 17, 2022
  • Latest release: Aug 9, 2023
  • Number of updates: 6
  • Update frequency: every 44.5 days
  • Top authors: prashantbhivsane (66.67%)radhikaxecurify (50%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /545 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.77ms] Passed 4 tests

An overview of server-side resources used by Web3 Smart Contracts
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.34 ▼2.56
Dashboard /wp-admin3.32 ▲0.0250.67 ▲3.81
Posts /wp-admin/edit.php3.43 ▲0.0849.33 ▼3.86
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.63 ▼11.24
Media Library /wp-admin/upload.php3.24 ▲0.0139.73 ▼1.40

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Web3 Smart Contracts
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6914.73 ▲0.091.84 ▲0.1544.31 ▲0.88
Dashboard /wp-admin2,206 ▲185.83 ▼0.02104.67 ▲1.6191.22 ▲48.36
Posts /wp-admin/edit.php2,104 ▲122.01 ▲0.0233.79 ▼7.6732.39 ▼3.66
Add New Post /wp-admin/post-new.php1,527 ▼623.11 ▼0.08765.06 ▲103.5554.48 ▲0.49
Media Library /wp-admin/upload.php1,400 ▲124.14 ▼0.0697.86 ▼6.3071.35 ▲25.41

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: web3, nft, ethereum, smart contracts, blockchain

web3-smart-contracts/web3-smart-contracts.php Passed 13 tests

Analyzing the main PHP file in "Web3 Smart Contracts" version 1.1.0
101 characters long description:
miniOrange Smart Contracts allow you to create and deploy Smart Contracts on your blockchain network.

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
Good job! No executable or dangerous file extensions detected15,930 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript33,4846,39115,305
PHP14117338623
CSS2002

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity6.00
▷ Minimum class complexity1.00
▷ Maximum class complexity11.00
Average method complexity2.45
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods31
▷ Static methods2064.52%
▷ Public methods31100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants00.00%
▷ Class constants6100.00%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
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
images/miniorange.png0.44KB0.35KB▼ 18.61%