72% steempress

Code Review | SteemPress

WordPress plugin SteemPress scored72%from 54 tests.

About plugin

  • Plugin page: steempress
  • Plugin version: 2.6.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.3.2
  • WordPress version: 6.3.1
  • First release: Jan 27, 2018
  • Latest release: Mar 30, 2020
  • Number of updates: 58
  • Update frequency: every 13.7 days
  • Top authors: howofr (100%)

Code review

54 tests

User reviews

20 reviews

Install metrics

200+ active /31,131 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.26MB] [CPU: ▼5.12ms] Passed 4 tests

Analyzing server-side resources used by SteemPress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2640.92 ▼0.08
Dashboard /wp-admin3.62 ▲0.2746.47 ▼13.75
Posts /wp-admin/edit.php3.67 ▲0.3251.05 ▲0.93
Add New Post /wp-admin/post-new.php6.16 ▲0.2793.94 ▼7.59
Media Library /wp-admin/upload.php3.48 ▲0.2536.14 ▲1.34
SteemPress /wp-admin/options-general.php?page=steempress_sp3.5434.08

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 31 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for SteemPress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,932 ▲17113.45 ▼0.918.25 ▲6.6639.55 ▲2.52
Dashboard /wp-admin2,203 ▲235.57 ▼0.1096.03 ▲4.8642.11 ▼6.62
Posts /wp-admin/edit.php2,131 ▲312.03 ▲0.0140.53 ▲2.8336.06 ▲1.52
Add New Post /wp-admin/post-new.php6,236 ▲4,71018.99 ▼4.09875.01 ▲108.7354.32 ▼3.66
Media Library /wp-admin/upload.php1,405 ▲114.22 ▲0.03103.30 ▲2.6848.19 ▲4.38
SteemPress /wp-admin/options-general.php?page=steempress_sp7271.516.5820.17

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=steempress_sp
    • > Notice in wp-content/plugins/steempress/admin/partials/steempress_sp-admin-display.php+24
    Undefined variable: options
    • > GET request to /wp-admin/options-general.php?page=steempress_sp
    • > Notice in wp-content/plugins/steempress/admin/partials/steempress_sp-admin-display.php+24
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/options-general.php?page=steempress_sp
    • > Notice in wp-content/plugins/steempress/admin/partials/steempress_sp-admin-display.php+103
    Undefined index: posting-key-display

SRP 0% 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
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/steempress/public/partials/steempress_sp-public-display.php
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Undefined variable: options in wp-content/plugins/steempress/admin/partials/steempress_sp-admin-display.php on line 24
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/steempress/admin/partials/steempress_sp-admin-display.php on line 24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/steempress/admin/partials/steempress_sp-admin-display.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/steempress/admin/partials/steempress_sp-user-display.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% 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
4 plugin tags: blockchain, monetization, wordpress, hive

steempress/steempress_sp.php 85% from 13 tests

The main file in "SteemPress" v. 2.6.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("steempress.php" instead of "steempress_sp.php")
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin1,685 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP195707751,552
Markdown156096
CSS14030
JavaScript35347

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.58
Average class complexity27.46
▷ Minimum class complexity1.00
▷ Maximum class complexity237.00
Average method complexity4.78
▷ Minimum method complexity1.00
▷ Maximum method complexity60.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes430.77%
Methods91
▷ Static methods1213.19%
▷ Public methods8087.91%
▷ Protected methods00.00%
▷ Private methods1112.09%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin