84% staticpress2019

Code Review | StaticPress2019

WordPress plugin StaticPress2019 scored84%from 54 tests.

About plugin

  • Plugin page: staticpress2019
  • Plugin version: 0.8.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-6.2
  • WordPress version: 6.3.1
  • First release: Dec 4, 2019
  • Latest release: Apr 10, 2023
  • Number of updates: 19
  • Update frequency: every 65.0 days
  • Top authors: yshinoda (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /8,785 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.63MB] [CPU: ▼3.52ms] Passed 4 tests

A check of server-side resources used by StaticPress2019
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.09 ▲0.6345.83 ▲8.59
Dashboard /wp-admin3.99 ▲0.6549.98 ▼10.12
Posts /wp-admin/edit.php4.05 ▲0.6949.79 ▲0.38
Add New Post /wp-admin/post-new.php6.51 ▲0.6384.63 ▼8.88
Media Library /wp-admin/upload.php3.85 ▲0.6340.17 ▲4.55
StaticPress2019 /wp-admin/admin.php?page=static-press3.8238.14
StaticPress2019 Options /wp-admin/admin.php?page=static-press-options3.8433.45

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 69 new files
Database: 1 new table, 6 new options
New tables
wp_urls
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

StaticPress2019: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲7214.38 ▲0.031.69 ▼0.0337.69 ▼3.58
Dashboard /wp-admin2,224 ▲475.52 ▼0.0582.72 ▼3.1078.91 ▲36.72
Posts /wp-admin/edit.php2,129 ▲291.95 ▼0.0736.99 ▲2.4334.55 ▲0.89
Add New Post /wp-admin/post-new.php1,705 ▲17922.52 ▼1.09705.36 ▲52.6849.61 ▲0.66
Media Library /wp-admin/upload.php1,429 ▲294.17 ▼0.0594.21 ▼1.4067.57 ▲23.10
StaticPress2019 /wp-admin/admin.php?page=static-press8492.0523.6125.42
StaticPress2019 Options /wp-admin/admin.php?page=static-press-options8852.0023.6023.75

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means 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 take a closer look at the following
  • 118× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'STATIC_PRESS_PLUGIN_DIRincludes/response_processors/class-static-press-response-processor-404.php' (include_path='.:/usr/share/php') in wp-content/plugins/staticpress2019/includes/response_processors/class-static-press-response-processor-404-dump.php on line 10
    • > PHP Fatal error
      require_once(): Failed opening required 'STATIC_PRESS_PLUGIN_DIRincludes/models/class-static-press-model-url.php' (include_path='.:/usr/share/php') in wp-content/plugins/staticpress2019/includes/models/class-static-press-model-url-other.php on line 10
    • > PHP Fatal error
      require_once(): Failed opening required 'STATIC_PRESS_PLUGIN_DIRincludes/response_processors/class-static-press-response-processor.php' (include_path='.:/usr/share/php') in wp-content/plugins/staticpress2019/includes/response_processors/class-static-press-response-processor-200.php on line 10
    • > PHP Warning
      require_once(STATIC_PRESS_PLUGIN_DIRincludes/repositories/class-static-press-repository.php): failed to open stream: No such file or directory in wp-content/plugins/staticpress2019/includes/models/class-static-press-model-url-static-file.php on line 10
    • > PHP Warning
      require_once(STATIC_PRESS_PLUGIN_DIRincludes/repositories/class-static-press-repository.php): failed to open stream: No such file or directory in wp-content/plugins/staticpress2019/includes/models/class-static-press-model-url-front-page.php on line 10
    • > PHP Fatal error
      require_once(): Failed opening required 'STATIC_PRESS_PLUGIN_DIRincludes/models/class-static-press-model-url.php' (include_path='.:/usr/share/php') in wp-content/plugins/staticpress2019/includes/models/class-static-press-model-url-single.php on line 10
    • > PHP Warning
      require_once(STATIC_PRESS_PLUGIN_DIRincludes/class-static-press-adapter-option.php): failed to open stream: No such file or directory in wp-content/plugins/staticpress2019/includes/class-static-press-admin.php on line 10
    • > PHP Warning
      require_once(STATIC_PRESS_PLUGIN_DIRincludes/class-static-press-site-dependency.php): failed to open stream: No such file or directory in wp-content/plugins/staticpress2019/includes/content_filters/class-static-press-content-filter-replace-relative-uri.php on line 10
    • > PHP Fatal error
      require_once(): Failed opening required 'STATIC_PRESS_PLUGIN_DIRincludes/class-static-press-site-dependency.php' (include_path='.:/usr/share/php') in wp-content/plugins/staticpress2019/includes/content_filters/class-static-press-content-filter-replace-relative-uri.php on line 10
    • > PHP Fatal error
      require_once(): Failed opening required 'STATIC_PRESS_PLUGIN_DIRincludes/models/class-static-press-model-url-term.php' (include_path='.:/usr/share/php') in wp-content/plugins/staticpress2019/includes/factories/class-static-press-factory-model-url-term.php on line 10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

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
1 plugin tags: static

staticpress2019/plugin.php 85% from 13 tests

Analyzing the main PHP file in "StaticPress2019" version 0.8.0
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("staticpress2019.php" instead of "plugin.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
Good job! No executable or dangerous file extensions detected3,220 lines of code in 58 files:
LanguageFilesBlank linesComment linesLines of code
PHP534102,1772,868
PO File45663182
JavaScript193170

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity6.65
▷ Minimum class complexity1.00
▷ Maximum class complexity60.00
Average method complexity2.18
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces10
Interfaces0
Traits0
Classes51
▷ Abstract classes47.84%
▷ Concrete classes4792.16%
▷ Final classes00.00%
Methods248
▷ Static methods3313.31%
▷ Public methods15964.11%
▷ Protected methods2610.48%
▷ Private methods6325.40%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants39
▷ Global constants37.69%
▷ Class constants3692.31%
▷ Public constants36100.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
4 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/rebuild32.png0.54KB0.65KB0.00%
images/staticpress.png0.34KB0.20KB▼ 41.95%
images/options32.png2.00KB1.62KB▼ 19.07%
images/menuicon-splite.png0.46KB0.28KB▼ 37.77%