58% staticpress

Code Review | StaticPress

WordPress plugin StaticPress scored58%from 54 tests.

About plugin

  • Plugin page: staticpress
  • Plugin version: 0.4.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.5.2
  • WordPress version: 6.3.1
  • First release: May 20, 2013
  • Latest release: May 27, 2016
  • Number of updates: 16
  • Update frequency: every 69.1 days
  • Top authors: wokamoto (100%)

Code review

54 tests

User reviews

16 reviews

Install metrics

800+ active /31,064 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.92MB] [CPU: ▼29.69ms] Passed 4 tests

Analyzing server-side resources used by StaticPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0445.54 ▲7.41
Dashboard /wp-admin3.02 ▼0.2824.09 ▼34.10
Posts /wp-admin/edit.php3.02 ▼0.3325.88 ▼21.47
Add New Post /wp-admin/post-new.php3.02 ▼2.8627.03 ▼60.89
Media Library /wp-admin/upload.php3.02 ▼0.2029.36 ▼2.31
StaticPress Options /wp-admin/admin.php?page=static-press-options3.0224.04
StaticPress /wp-admin/admin.php?page=static-press3.0223.79

Server storage [IO: ▲0.08MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

StaticPress: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.72 ▲0.121.73 ▲0.0643.41 ▼7.24
Dashboard /wp-admin2,227 ▲505.51 ▼0.1882.59 ▼5.2778.68 ▲39.87
Posts /wp-admin/edit.php2,129 ▲291.97 ▼0.0534.93 ▼5.3632.37 ▼4.37
Add New Post /wp-admin/post-new.php1,704 ▲17522.46 ▼0.67745.63 ▲83.5265.00 ▲0.52
Media Library /wp-admin/upload.php1,432 ▲384.17 ▼0.0198.37 ▲1.3080.99 ▲35.50
StaticPress Options /wp-admin/admin.php?page=static-press-options8732.0324.2227.75
StaticPress /wp-admin/admin.php?page=static-press8112.0225.7720.94

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_urls
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=static-press
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=static-press
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=static-press
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% 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× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/staticpress/plugin.php:37

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
1 plugin tags: static

staticpress/plugin.php 85% from 13 tests

Analyzing the main PHP file in "StaticPress" version 0.4.5
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("staticpress.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin1,715 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP6232841,579
PO File34248136

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity69.25
▷ Minimum class complexity20.00
▷ Maximum class complexity161.00
Average method complexity4.10
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods88
▷ Static methods1415.91%
▷ Public methods3944.32%
▷ Protected methods00.00%
▷ Private methods4955.68%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants15
▷ Global constants320.00%
▷ Class constants1280.00%
▷ Public constants12100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and 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/menuicon-splite.png0.46KB0.28KB▼ 37.77%
images/staticpress.png0.34KB0.20KB▼ 41.95%
images/options32.png2.00KB1.62KB▼ 19.07%