10% somenano

Code Review | SomeNano for WordPress

WordPress plugin SomeNano for WordPress scored10%from 54 tests.

About plugin

  • Plugin page: somenano
  • Plugin version: 0.1.4
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.1.1
  • WordPress version: 6.3.1
  • First release: Apr 23, 2019
  • Latest release: May 5, 2019
  • Number of updates: 13
  • Update frequency: every 0.9 days
  • Top authors: pwlk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,820 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/somenano/somenano-install.php+48
    Undefined variable: somenano_version

Server metrics [RAM: ▼0.30MB] [CPU: ▼24.84ms] Passed 4 tests

This is a short check of server-side resources used by SomeNano for WordPress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2424.77 ▼16.01
Dashboard /wp-admin3.26 ▼0.0928.63 ▼33.71
Posts /wp-admin/edit.php3.34 ▼0.0233.37 ▼8.08
Add New Post /wp-admin/post-new.php4.74 ▼1.1542.92 ▼41.55
Media Library /wp-admin/upload.php3.28 ▲0.0627.10 ▼2.94
SomeNano /wp-admin/options-general.php?page=somenano-settings3.1826.46

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 12 new files
Database: 2 new tables, 8 new options
New tables
wp_somenano_payments
wp_somenano_paywalls
New WordPress options
$somenano_db_version
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
$somenano_version

Browser metrics Passed 4 tests

Checking browser requirements for SomeNano for WordPress
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,862 ▲11613.26 ▼1.141.95 ▲0.0446.93 ▲2.71
Dashboard /wp-admin2,220 ▲325.90 ▲0.01101.34 ▼15.4047.15 ▲5.53
Posts /wp-admin/edit.php2,106 ▲142.01 ▲0.0234.78 ▼0.3833.95 ▲5.16
Add New Post /wp-admin/post-new.php1,531 ▲323.18 ▲4.77589.04 ▼19.5061.43 ▲12.45
Media Library /wp-admin/upload.php1,405 ▲144.21 ▼0.0396.91 ▼6.9743.79 ▼0.42
SomeNano /wp-admin/options-general.php?page=somenano-settings1,5942.0522.3927.97

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
You still need to fix the following
  • Zombie tables detected upon uninstall: 2 tables
    • wp_somenano_paywalls
    • wp_somenano_payments
  • This plugin does not fully uninstall, leaving 8 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • $somenano_version
    • theysaidso_admin_options
    • $somenano_db_version

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=somenano-settings
    • > Notice in wp-content/plugins/somenano/somenano-wordpress.php+44
    Undefined variable: somenano_version

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 7× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/somenano/somenano-install.php
    • > /wp-content/plugins/somenano/somenano-options.php
    • > /wp-content/plugins/somenano/somenano-brainblocks.php
    • > /wp-content/plugins/somenano/somenano-defaults.php
    • > /wp-content/plugins/somenano/somenano-dbview.php
    • > /wp-content/plugins/somenano/somenano-log.php
    • > /wp-content/plugins/somenano/somenano-wordpress.php

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)
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=somenano-settings
    • > Network (severe)
    https://brainblocks.io/brainblocks.min.js?ver=20231010185816 - Failed to load resource: net::ERR_CERT_DATE_INVALID
    • > GET request to /wp-admin/options-general.php?page=somenano-settings
    • > Javascript (severe) in unknown
    /wp-admin/options-general.php?page=somenano-settings 208:0 Uncaught ReferenceError: brainblocks is not defined

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
9 plugin tags: paywall, nano, cryptocurrency, pay, wall...

somenano/somenano-wordpress.php 92% from 13 tests

The primary PHP file in "SomeNano for WordPress" version 0.1.4 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("somenano.php" instead of "somenano-wordpress.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected770 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP714587704
JavaScript15840
CSS24026

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity29.00
▷ Minimum class complexity29.00
▷ Maximum class complexity29.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions25
▷ Named functions25100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin