84% jamstackpress

Code Review | JAMStackPress

WordPress plugin JAMStackPress scored 84% from 54 tests.

About plugin

  • Plugin page: jamstackpress
  • Plugin version: 0.1.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7.1-6.0.1
  • WordPress version: 6.3.1
  • First release: Apr 28, 2021
  • Latest release: Jul 26, 2022
  • Number of updates: 9
  • Update frequency: every 51.2 days
  • Top authors: jamstackpress (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 1,555 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.27MB] [CPU: ▲3.96ms] Passed 4 tests

Server-side resources used by JAMStackPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2941.66 ▼3.04
Dashboard /wp-admin3.60 ▲0.3051.82 ▲2.61
Posts /wp-admin/edit.php3.65 ▲0.3056.48 ▲10.40
Add New Post /wp-admin/post-new.php6.13 ▲0.24105.65 ▲8.64
Media Library /wp-admin/upload.php3.47 ▲0.2444.32 ▲7.62

Server storage [IO: ▲1.38MB] [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: 54 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for JAMStackPress
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲5414.47 ▲0.091.75 ▼0.3439.02 ▼5.72
Dashboard /wp-admin2,231 ▲544.99 ▼0.92102.45 ▼13.5737.49 ▼6.15
Posts /wp-admin/edit.php2,117 ▲281.99 ▼0.0138.66 ▲5.5536.57 ▲2.01
Add New Post /wp-admin/post-new.php1,554 ▲1818.25 ▼2.83587.17 ▼96.3455.98 ▲0.78
Media Library /wp-admin/upload.php1,413 ▲284.27 ▲0.1394.46 ▼28.9441.08 ▼9.83

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 112× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined variable: option in wp-content/plugins/jamstackpress/src/Plugin/Admin/views/options/contact-notification-email.php on line 3
    • > PHP Notice
      Undefined variable: option in wp-content/plugins/jamstackpress/src/Plugin/Admin/views/options/add-image-sizes-filter-enabled.php on line 3
    • > PHP Notice
      Undefined variable: option in wp-content/plugins/jamstackpress/src/Plugin/Admin/views/options/routes-field-enabled.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/jamstackpress/src/Plugin/Admin/views/options/successful-contact-message.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Noodlehaus\\Writer\\AbstractWriter' not found in wp-content/plugins/jamstackpress/vendor/hassankhan/config/src/Writer/Properties.php:16
    • > PHP Notice
      Undefined variable: option in wp-content/plugins/jamstackpress/src/Plugin/Admin/views/options/readable-date-field-enabled.php on line 3
    • > PHP Notice
      Undefined variable: option in wp-content/plugins/jamstackpress/src/Plugin/Admin/views/options/contact-route-enabled.php on line 8
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/jamstackpress/src/Plugin/Admin/views/options/frontend-url.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'Noodlehaus\\AbstractConfig' not found in wp-content/plugins/jamstackpress/vendor/hassankhan/config/src/Config.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Noodlehaus\\Writer\\AbstractWriter' not found in wp-content/plugins/jamstackpress/vendor/hassankhan/config/src/Writer/Ini.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 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
7 plugin tags: api, headless, pwa, jamstack, spa...

jamstackpress/jamstackpress.php Passed 13 tests

This is the main PHP file of "JAMStackPress" version 0.1.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
59 characters long description:
Power-up your WordPress site and get it ready for JAMStack.

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
Success! There were no dangerous files found in this plugin3,970 lines of code in 99 files:
LanguageFilesBlank linesComment linesLines of code
PHP817842,1183,158
JSON500321
Markdown61560291
YAML4171199
SVG14154
XML20047

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity6.06
▷ Minimum class complexity1.00
▷ Maximum class complexity62.00
Average method complexity2.52
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces19
Interfaces7
Traits0
Classes55
▷ Abstract classes59.09%
▷ Concrete classes5090.91%
▷ Final classes00.00%
Methods220
▷ Static methods8036.36%
▷ Public methods18182.27%
▷ Protected methods3315.00%
▷ Private methods62.73%
Functions10
▷ Named functions550.00%
▷ Anonymous functions550.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 1.25MB with 1.08MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-128x128.png58.58KB3.14KB▼ 94.64%
assets/icon-256x256.png1,067.56KB14.89KB▼ 98.61%
assets/screenshot-1.png153.08KB52.29KB▼ 65.85%