73% opensea

Code Review | Opensea

WordPress plugin Opensea scored 73% from 54 tests.

About plugin

  • Plugin page: opensea
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.1.1
  • WordPress version: 6.3.1
  • First release: Apr 14, 2021
  • Latest release: Nov 23, 2022
  • Number of updates: 23
  • Update frequency: every 25.6 days
  • Top authors: alexmoss (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

800+ active / 11,974 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲4.61MB] [CPU: ▲22.10ms] 75% from 4 tests

A check of server-side resources used by Opensea
The following require your attention
  • CPU: You should keep total CPU usage under 500.00ms (currently 1,665.28ms on /wp-admin/options-general.php?page=opensea)
PageMemory (MB)CPU Time (ms)
Home /8.47 ▲5.0157.69 ▲16.28
Dashboard /wp-admin8.50 ▲5.2075.39 ▲24.49
Posts /wp-admin/edit.php8.50 ▲5.1566.36 ▲19.34
Add New Post /wp-admin/post-new.php8.97 ▲3.09124.22 ▲33.72
Media Library /wp-admin/upload.php8.50 ▲5.2861.41 ▲28.28
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius8.5053.55
Opensea /wp-admin/options-general.php?page=opensea8.511,665.28

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 172 new files
Database: no new tables, 10 new options
New WordPress options
widget_recent-posts
db_upgraded
fs_gdpr
can_compress_scripts
fs_debug_mode
fs_accounts
widget_theysaidso_widget
widget_recent-comments
fs_active_plugins
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Opensea
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,850 ▲11513.22 ▼1.071.98 ▼0.0635.12 ▼14.93
Dashboard /wp-admin2,231 ▲495.83 ▲0.95104.66 ▼12.6346.26 ▲3.02
Posts /wp-admin/edit.php2,114 ▲251.99 ▼0.0237.09 ▲1.3836.77 ▲5.27
Add New Post /wp-admin/post-new.php1,525 ▼923.27 ▲0.14647.82 ▼17.2155.56 ▲5.19
Media Library /wp-admin/upload.php1,410 ▲224.21 ▲0.0696.99 ▼17.8946.60 ▲3.33
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius1,0601.7223.7426.02
Opensea /wp-admin/options-general.php?page=opensea1,0335.70114.9944.29

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/opensea/freemius/includes/class-freemius.php+8575
    Undefined property: stdClass::$plugins
  • Zombie WordPress options detected upon uninstall: 10 options
    • can_compress_scripts
    • db_upgraded
    • fs_active_plugins
    • widget_theysaidso_widget
    • fs_gdpr
    • fs_accounts
    • fs_debug_mode
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/opensea/class-admin.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/opensea/opensea.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/opensea/class-frontend.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
10 plugin tags: web3, digitalcollectibles, nft, digitalcollectible, blockchain...

opensea/opensea.php 92% from 13 tests

"Opensea" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 262 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin31,100 lines of code in 127 files:
LanguageFilesBlank linesComment linesLines of code
PHP1107,27216,10130,550
Markdown1680214
JavaScript33459194
CSS12120115
JSON10027

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
Please fix the following
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 2,910)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity90.29
▷ Minimum class complexity1.00
▷ Maximum class complexity2,910.00
Average method complexity4.65
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes45
▷ Abstract classes24.44%
▷ Concrete classes4395.56%
▷ Final classes00.00%
Methods1,132
▷ Static methods17315.28%
▷ Public methods79269.96%
▷ Protected methods151.33%
▷ Private methods32528.71%
Functions103
▷ Named functions103100.00%
▷ Anonymous functions00.00%
Constants129
▷ Global constants10480.62%
▷ Class constants2519.38%
▷ Public constants25100.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
3 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
images/alexm-wallet.png13.36KB2.61KB▼ 80.45%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%