84% cron-staticpress

Code Review | StaticPress Auto Builder

WordPress plugin StaticPress Auto Builder scored84%from 54 tests.

About plugin

  • Plugin page: cron-staticpress
  • Plugin version: 1.1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-4.9.4
  • WordPress version: 6.3.1
  • First release: Mar 23, 2018
  • Latest release: Aug 5, 2018
  • Number of updates: 16
  • Update frequency: every 8.5 days
  • Top authors: yuji.od (100%)Otto42 (12.5%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /885 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

This is a short check of server-side resources used by StaticPress Auto Builder
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0741.44 ▼2.15
Dashboard /wp-admin3.39 ▲0.0847.13 ▲2.37
Posts /wp-admin/edit.php3.50 ▲0.1450.43 ▲0.90
Add New Post /wp-admin/post-new.php5.97 ▲0.0897.11 ▲3.48
Media Library /wp-admin/upload.php3.31 ▲0.0839.25 ▲5.89
Auto Builder /wp-admin/admin.php?page=static-press-cron-options3.2740.15

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
staticpress_cron_option
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for StaticPress Auto Builder
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲5113.29 ▼1.451.73 ▼0.3743.08 ▲5.82
Dashboard /wp-admin2,214 ▲264.86 ▼1.02110.09 ▼4.0740.41 ▼3.98
Posts /wp-admin/edit.php2,096 ▲102.01 ▼0.0440.11 ▲4.6136.83 ▲5.76
Add New Post /wp-admin/post-new.php1,547 ▲3323.28 ▲5.75583.90 ▼120.0748.83 ▼7.60
Media Library /wp-admin/upload.php1,399 ▲84.24 ▼0.0494.72 ▼8.0342.45 ▼3.27
Auto Builder /wp-admin/admin.php?page=static-press-cron-options8742.2126.1430.20

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
Please fix the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/cron-staticpress/includes/StaticPress_Cron.class.php:278
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/cron-staticpress/includes/StaticPress_Cron.class.php:278

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed: Please take inspiration from this readme.txt

cron-staticpress/plugin.php 92% from 13 tests

Analyzing the main PHP file in "StaticPress Auto Builder" version 1.1.2
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("cron-staticpress.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin295 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP33878295

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity17.00
▷ Minimum class complexity8.00
▷ Maximum class complexity26.00
Average method complexity2.78
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions00.00%
▷ Anonymous functions5100.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin