78% likecoin

Code Review | Web3Press - Decentralize Publishing with Writing NFT

WordPress plugin Web3Press - Decentralize Publishing with Writing NFT scored78%from 54 tests.

About plugin

  • Plugin page: likecoin
  • Plugin version: 3.1.3
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.2
  • WordPress version: 6.3.1
  • First release: Aug 9, 2018
  • Latest release: Sep 26, 2023
  • Number of updates: 112
  • Update frequency: every 16.7 days
  • Top authors: likecoin (95.54%)williamchong007 (5.36%)

Code review

54 tests

User reviews

10 reviews

Install metrics

1,000+ active /58,989 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.07MB] [CPU: ▼3.64ms] Passed 4 tests

A check of server-side resources used by Web3Press - Decentralize Publishing with Writing NFT
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0738.36 ▼3.58
Dashboard /wp-admin3.37 ▲0.0647.31 ▲0.88
Posts /wp-admin/edit.php3.42 ▲0.0752.23 ▲3.19
Add New Post /wp-admin/post-new.php5.99 ▲0.1086.12 ▼15.04
Media Library /wp-admin/upload.php3.29 ▲0.0642.91 ▲8.05
Plugin Setting /wp-admin/admin.php?page=likecoin3.2734.02
Getting Started /wp-admin/admin.php?page=likecoin_help3.2734.95
Liker ID /wp-admin/admin.php?page=likecoin_liker_id3.2740.42

Server storage [IO: ▲0.66MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 146 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
db_upgraded
lc_plugin_options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics 75% from 4 tests

An overview of browser requirements for Web3Press - Decentralize Publishing with Writing NFT
A great user experience is important, so you should focus on the following
  • Script duration: Please improve your JavaScript code, lowering total execution time to less than 1,500.00ms (currently 1,621.46ms on /wp-admin/admin.php?page=likecoin_help)
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,850 ▲6414.35 ▲0.191.60 ▼0.5139.67 ▼5.61
Dashboard /wp-admin2,241 ▲645.52 ▼0.1281.25 ▼7.3537.39 ▼3.74
Posts /wp-admin/edit.php2,194 ▲941.99 ▼0.0240.59 ▼0.3235.57 ▼0.84
Add New Post /wp-admin/post-new.php6,418 ▲4,88329.97 ▲11.85958.17 ▲342.8244.28 ▼18.67
Media Library /wp-admin/upload.php1,453 ▲534.26 ▲0.0598.58 ▼7.7441.22 ▼4.52
Plugin Setting /wp-admin/admin.php?page=likecoin9774.4667.2655.24
Getting Started /wp-admin/admin.php?page=likecoin_help1,88128.381,621.46130.10
Liker ID /wp-admin/admin.php?page=likecoin_liker_id9164.2258.4633.80

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
Please fix the following items
  • 22× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/file.php' (include_path='.:/usr/share/php') in wp-content/plugins/likecoin/includes/class-likecoin-matters-api.php on line 26
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/file.php): failed to open stream: No such file or directory in wp-content/plugins/likecoin/includes/class-likecoin-matters-api.php on line 26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/likecoin/likecoin.php:40
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/file.php): failed to open stream: No such file or directory in wp-content/plugins/likecoin/includes/class-likecoin-matters-api.php on line 26
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/likecoin/includes/class-likecoin-matters-api.php on line 26
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/file.php' (include_path='.:/usr/share/php') in wp-content/plugins/likecoin/includes/class-likecoin-matters-api.php on line 26
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/likecoin/includes/class-likecoin-matters-api.php on line 26
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/file.php' (include_path='.:/usr/share/php') in wp-content/plugins/likecoin/includes/class-likecoin-matters-api.php on line 26
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/likecoin/includes/class-likecoin-matters-api.php on line 26
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/file.php): failed to open stream: No such file or directory in wp-content/plugins/likecoin/includes/class-likecoin-matters-api.php on line 26

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There are user-side issues you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=likecoin_help
    • > Console-api (warning) in unknown
    https://www.datadoghq-browser-agent.com/datadog-rum-v4.js 0:143533 "Datadog Browser SDK:" "No storage available for session. We will not send any data."
    • > GET request to /wp-admin/admin.php?page=likecoin_help
    • > Security (severe) in unknown
    https://substackcdn.com/bundle/channelFrame.48a6a65cf4dd6b036108.bundle.js 198 Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://newsletter.like.co') does not match the recipient window's origin ('').

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: web3, depub, blockchain, decentralized, publishing...

likecoin/likecoin.php Passed 13 tests

"Web3Press - Decentralize Publishing with Writing NFT" version 3.1.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
108 characters long description:
Publishes your posts to the blockchain. Sell your posts, share your work, build community, preserve content.

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
Good job! No executable or dangerous file extensions detected9,615 lines of code in 128 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript762271344,355
PHP292121,1112,939
CSS8338531,995
JSON400206
SVG70486
Sass44034

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity33.00
▷ Minimum class complexity33.00
▷ Maximum class complexity33.00
Average method complexity3.46
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods17.69%
▷ Public methods1076.92%
▷ Protected methods00.00%
▷ Private methods323.08%
Functions117
▷ Named functions10388.03%
▷ Anonymous functions1411.97%
Constants46
▷ Global constants46100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
6 PNG files occupy 0.15MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/likecoin.png36.50KB11.21KB▼ 69.28%
js/admin-settings/src/assets/w3p_logo.png2.53KB2.61KB0.00%
js/admin-settings/src/assets/logo.png4.48KB2.71KB▼ 39.56%
assets/js/admin-settings/images/w3p_logo.443a5708.png2.53KB2.61KB0.00%
assets/js/admin-settings/images/w3p_banner.13b75e39.png52.81KB56.35KB0.00%