77% simple-long-form

Code Review | Simple Long Form

WordPress plugin Simple Long Form scored77%from 54 tests.

About plugin

  • Plugin page: simple-long-form
  • Plugin version: 2.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2.3-5.9
  • WordPress version: 6.3.1
  • First release: Sep 17, 2015
  • Latest release: Feb 26, 2022
  • Number of updates: 341
  • Update frequency: every 6.9 days
  • Top authors: loreline (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

90+ active /11,360 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.76MB] [CPU: ▼3.46ms] Passed 4 tests

A check of server-side resources used by Simple Long Form
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.22 ▲0.7643.46 ▲2.64
Dashboard /wp-admin4.13 ▲0.7857.24 ▼10.03
Posts /wp-admin/edit.php4.18 ▲0.8254.41 ▼4.22
Add New Post /wp-admin/post-new.php6.65 ▲0.7695.16 ▼2.24
Media Library /wp-admin/upload.php3.99 ▲0.7640.51 ▲4.30
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=longform3.9938.84
Options /wp-admin/edit.php?post_type=longform&page=simplelongform-options3.9867.05
Add New /wp-admin/post-new.php?post_type=longform4.3759.20
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=longform3.9952.81
Longforms /wp-admin/edit.php?post_type=longform4.1451.72

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 159 new files
Database: no new tables, 22 new options
New WordPress options
archiveslist
addcpthome
pinterest
can_compress_scripts
theysaidso_admin_options
category_children
slf_linkedin
db_upgraded
addcptsearch
email
...

Browser metrics Passed 4 tests

A check of browser resources used by Simple Long Form
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,893 ▲14714.39 ▲0.042.01 ▼0.2841.77 ▼3.24
Dashboard /wp-admin2,296 ▲1225.88 ▲0.2687.87 ▼20.4439.23 ▼15.33
Posts /wp-admin/edit.php2,164 ▲642.32 ▲0.3539.03 ▼3.0829.90 ▼7.75
Add New Post /wp-admin/post-new.php1,732 ▲20422.19 ▼0.82670.64 ▼8.0934.23 ▼24.16
Media Library /wp-admin/upload.php1,462 ▲624.49 ▲0.25102.22 ▼16.0941.36 ▼2.55
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=longform1,3862.0734.1437.57
Options /wp-admin/edit.php?post_type=longform&page=simplelongform-options1,4683.3664.6283.59
Add New /wp-admin/post-new.php?post_type=longform7,11914.67535.57125.49
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=longform1,5222.1838.0037.92
Longforms /wp-admin/edit.php?post_type=longform1,3903.6157.4838.34

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 22 options
    • widget_recent-comments
    • metadata
    • category_children
    • whatsapp
    • widget_slf_widget
    • can_compress_scripts
    • twitter
    • widget_recent-posts
    • slf_linkedin
    • archiveslist
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 19× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/simple-long-form/templates/slf_header.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/simple-long-form/templates/slf.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/simple-long-form/inc/slf-meta-box.php:5
    • > PHP Notice
      Undefined variable: bar_sup in wp-content/plugins/simple-long-form/templates/slf_intranav.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-long-form/inc/slf-duplicate.php:42
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/simple-long-form/inc/slf-widget.php:2
    • > PHP Notice
      Undefined variable: burger_style in wp-content/plugins/simple-long-form/templates/slf_intranav.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/simple-long-form/templates/slf_archives.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function post_password_required() in wp-content/plugins/simple-long-form/templates/comments.php:12
    • > PHP Notice
      Undefined variable: bar_title in wp-content/plugins/simple-long-form/templates/slf_intranav.php on line 24

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
    • > GET request to /wp-admin/edit.php?post_type=longform&page=simplelongform-options
    • > Javascript (severe) in unknown
    /wp-admin/edit.php?post_type=longform&page=simplelongform-options 174:74 Uncaught SyntaxError: Unexpected end of input

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 75% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
  • Screenshots: Add a description for screenshot #6 in simple-long-form/assets to your readme.txt
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === simple-long-form === )
  • Screenshots: Screenshot #4 (/tags/4.3/screenshot-5.jpg`) image not found
The official readme.txt might help

simple-long-form/simple-long-form.php 92% from 13 tests

The entry point to "Simple Long Form" version 2.2.2 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and 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

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin46,536 lines of code in 113 files:
LanguageFilesBlank linesComment linesLines of code
CSS264,20828712,408
JavaScript271,0784329,416
SVG30128,954
Sass18505344,649
LESS18502554,607
PHP153741123,322
PO File62,0643,3703,180

PHP code Passed 2 tests

Analyzing 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.61
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions79
▷ Named functions79100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
3 PNG files occupy 0.25MB with 0.11MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/images/btb.png30.87KB30.34KB▼ 1.71%
inc/images/sawi.png85.73KB27.32KB▼ 68.13%
inc/images/utw.png134.57KB42.85KB▼ 68.16%