64% ethpress

Code Review | EthPress - Web3 Login

WordPress plugin EthPress - Web3 Login scored64%from 54 tests.

About plugin

  • Plugin page: ethpress
  • Plugin version: 2.2.3
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.4.0
  • WordPress version: 6.3.1
  • First release: Jun 4, 2019
  • Latest release: Oct 27, 2023
  • Number of updates: 141
  • Update frequency: every 11.4 days
  • Top authors: ethereumicoio (53.9%)lynn999 (46.81%)

Code review

54 tests

User reviews

11 reviews

Install metrics

600+ active /29,082 total downloads

Benchmarks

Plugin footprint 47% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.58MB] [CPU: ▲2.38ms] 75% from 4 tests

An overview of server-side resources used by EthPress - Web3 Login
It is recommended to improve the following
  • CPU: Total CPU usage must kept under 500.00ms (currently 2,060.73ms on /wp-admin/options-general.php?page=ethpress)
PageMemory (MB)CPU Time (ms)
Home /4.10 ▲0.6439.59 ▲3.65
Dashboard /wp-admin3.94 ▲0.6355.95 ▲9.02
Posts /wp-admin/edit.php3.99 ▲0.6352.96 ▲4.37
Add New Post /wp-admin/post-new.php6.46 ▲0.5784.77 ▼7.54
Media Library /wp-admin/upload.php3.70 ▲0.4742.23 ▲9.56
EthPress /wp-admin/options-general.php?page=ethpress3.942,060.73
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius4.0537.49

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 255 new files
Database: no new tables, 10 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_ethpress
fs_accounts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
fs_debug_mode
can_compress_scripts
fs_active_plugins

Browser metrics Passed 4 tests

A check of browser resources used by EthPress - Web3 Login
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲4856.70 ▲42.331.58 ▼0.1227.13 ▼11.08
Dashboard /wp-admin2,228 ▲515.57 ▼0.1092.35 ▼6.0342.64 ▼0.32
Posts /wp-admin/edit.php2,134 ▲312.14 ▲0.1140.17 ▼2.8138.30 ▲1.35
Add New Post /wp-admin/post-new.php1,546 ▲1523.35 ▲0.17671.82 ▼1.8055.02 ▼7.66
Media Library /wp-admin/upload.php1,424 ▲244.19 ▲0.0797.31 ▼7.6044.74 ▼2.38
EthPress /wp-admin/options-general.php?page=ethpress9811.7024.4058.51
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius1,0681.6924.9326.75

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/ethpress/freemius/includes/class-freemius.php+8515
    Undefined property: stdClass::$plugins
  • This plugin has failed uninstalling correctly, leaving 255 files (4.64MB) in the plugin directory
    • (new file) app/Admin/Options.php
    • (new file) app/Dependencies/Elliptic/Curve/MontCurve.php
    • (new file) app/Dependencies/BI/BigInteger.php
    • (new file) app/Dependencies/Elliptic/Curve/BaseCurve.php
    • (new file) app/Address.php
    • (new file) app/Dependencies/BN/Red.php
    • (new file) app/Dependencies/Elliptic/Curve/BaseCurve/Point.php
    • (new file) app/Dependencies/Elliptic/Curve/EdwardsCurve/Point.php
    • (new file) app/Dependencies/BN/BN.php
    • (new file) app/Dependencies/Elliptic/Curve/EdwardsCurve.php
    • ...
  • Zombie WordPress options detected upon uninstall: 10 options
    • widget_recent-posts
    • widget_ethpress
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • fs_active_plugins
    • fs_accounts
    • widget_theysaidso_widget
    • can_compress_scripts
    • fs_debug_mode

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 9× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'losnappas\\Ethpress\\Dependencies\\Elliptic\\Curve\\BaseCurve' not found in wp-content/plugins/ethpress/app/Dependencies/Elliptic/Curve/EdwardsCurve.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'losnappas\\Ethpress\\Dependencies\\Elliptic\\Curve\\BaseCurve' not found in wp-content/plugins/ethpress/app/Dependencies/Elliptic/Curve/MontCurve.php:9
    • > PHP Fatal error
      Uncaught Exception: Cannot use BigInteger. Neither gmp nor bcmath module is loaded in wp-content/plugins/ethpress/app/Dependencies/BI/BigInteger.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'losnappas\\Ethpress\\Dependencies\\Elliptic\\Curve\\BaseCurve\\Point' not found in wp-content/plugins/ethpress/app/Dependencies/Elliptic/Curve/MontCurve/Point.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'losnappas\\Ethpress\\Dependencies\\Elliptic\\Curve\\BaseCurve\\Point' not found in wp-content/plugins/ethpress/app/Dependencies/Elliptic/Curve/EdwardsCurve/Point.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'losnappas\\Ethpress\\Dependencies\\Elliptic\\Curve\\PresetCurve' not found in wp-content/plugins/ethpress/app/Dependencies/Elliptic/Curves.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'losnappas\\Ethpress\\Dependencies\\Elliptic\\Curve\\BaseCurve' not found in wp-content/plugins/ethpress/app/Dependencies/Elliptic/Curve/ShortCurve.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'losnappas\\Ethpress\\Dependencies\\Elliptic\\Curve\\BaseCurve\\Point' not found in wp-content/plugins/ethpress/app/Dependencies/Elliptic/Curve/ShortCurve/JPoint.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'losnappas\\Ethpress\\Dependencies\\Elliptic\\Curve\\BaseCurve\\Point' not found in wp-content/plugins/ethpress/app/Dependencies/Elliptic/Curve/ShortCurve/Point.php:8

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
10 plugin tags: web3, login, nft, trust wallet, ethereum...

ethpress/ethpress.php Passed 13 tests

The main file in "EthPress - Web3 Login" v. 2.2.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
62 characters long description:
Ethereum Web3 login. Enable crypto wallet logins to WordPress.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin45,227 lines of code in 198 files:
LanguageFilesBlank linesComment linesLines of code
PHP1699,51018,89344,375
PO File1127168324
JavaScript746137292
CSS16231172
JSON10038
Markdown215024
SVG2002

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Please tend to the following items
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 3,088)
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity60.70
▷ Minimum class complexity1.00
▷ Maximum class complexity3,088.00
Average method complexity4.05
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces17
Interfaces0
Traits0
Classes92
▷ Abstract classes44.35%
▷ Concrete classes8895.65%
▷ Final classes22.27%
Methods1,817
▷ Static methods36119.87%
▷ Public methods1,39376.66%
▷ Protected methods221.21%
▷ Private methods40222.12%
Functions152
▷ Named functions14394.08%
▷ Anonymous functions95.92%
Constants160
▷ Global constants10867.50%
▷ Class constants5232.50%
▷ Public constants52100.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
9 PNG files occupy 0.26MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
public/images/download-metamask-dark.png76.53KB33.40KB▼ 56.35%
public/images/download-metamask-small.png21.62KB8.81KB▼ 59.25%
public/images/download-metamask.png75.67KB31.58KB▼ 58.27%
public/images/download-metamask-dark-small.png21.78KB8.80KB▼ 59.59%