78% plebeian-market

Code Review | Plebeian Market Peer2Peer E-commerce for Bitcoin

WordPress plugin Plebeian Market Peer2Peer E-commerce for Bitcoin scored78%from 54 tests.

About plugin

  • Plugin page: plebeian-market
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Dec 9, 2022
  • Latest release: Dec 9, 2022
  • Number of updates: 6
  • Update frequency: every 2.0 days
  • Top authors: plebeianmarket (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /143 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▲1.46ms] Passed 4 tests

Analyzing server-side resources used by Plebeian Market Peer2Peer E-commerce for Bitcoin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.14317.25 ▲277.58
Dashboard /wp-admin3.37 ▲0.0749.88 ▲0.07
Posts /wp-admin/edit.php3.49 ▲0.1354.12 ▲7.50
Add New Post /wp-admin/post-new.php5.95 ▲0.0686.43 ▼11.94
Media Library /wp-admin/upload.php3.27 ▲0.0444.12 ▲10.19
Setup /wp-admin/admin.php?page=plebeian_market_setup3.2736.04

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Plebeian Market Peer2Peer E-commerce for Bitcoin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,166 ▲43116.24 ▲1.6611.09 ▲9.3136.86 ▼11.60
Dashboard /wp-admin2,400 ▲2097.16 ▲1.29137.88 ▲31.7835.45 ▼6.39
Posts /wp-admin/edit.php2,323 ▲2313.96 ▲1.9272.45 ▲37.3433.10 ▲0.09
Add New Post /wp-admin/post-new.php1,728 ▲18823.39 ▲0.17667.24 ▼9.1434.56 ▼36.12
Media Library /wp-admin/upload.php1,520 ▲1325.15 ▲0.8795.49 ▼5.8341.90 ▼1.88
Setup /wp-admin/admin.php?page=plebeian_market_setup1,3444.0467.9464.25

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/plebeian-market/config.php:103

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=plebeian_market_setup
    • > Network (severe)
    https://plebeian.market/api/users/me?_=1696589895895 - Failed to load resource: the server responded with a status of 401 ()

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Contributors: The plugin contributors field is missing
You can look at the official readme.txt

plebeian-market/plebeian-market.php 85% from 13 tests

"Plebeian Market Peer2Peer E-commerce for Bitcoin" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Domain Path: The domain path folder was not found ("/languages")
  • Description: Keep the plugin description shorter than 140 characters (currently 178 characters long)

Code Analysis Passed 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
No dangerous file extensions were detected4,814 lines of code in 61 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript244231992,484
PHP213855611,878
CSS106113337
YAML15061
Markdown124039
SVG30012
Bourne Shell1003

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity5.65
▷ Minimum class complexity1.00
▷ Maximum class complexity30.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes00.00%
Methods65
▷ Static methods2030.77%
▷ Public methods6092.31%
▷ Protected methods00.00%
▷ Private methods57.69%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants48
▷ Global constants36.25%
▷ Class constants4593.75%
▷ Public constants45100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
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
common/img/plebeian_market_logo.png4.91KB2.47KB▼ 49.67%