78% post-snapshots

Code Review | Post Snapshots

WordPress plugin Post Snapshots scored78%from 54 tests.

About plugin

  • Plugin page: post-snapshots
  • Plugin version: 0.9
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-4.9.6
  • WordPress version: 6.3.1
  • First release: Aug 14, 2018
  • Latest release: Aug 14, 2018
  • Number of updates: 2
  • Update frequency: every 3.0 days
  • Top authors: Blackbam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /518 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.20ms] Passed 4 tests

Server-side resources used by Post Snapshots
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.20 ▼5.25
Dashboard /wp-admin3.32 ▲0.0246.60 ▼3.11
Posts /wp-admin/edit.php3.37 ▲0.0146.55 ▲1.60
Add New Post /wp-admin/post-new.php5.90 ▲0.0287.73 ▼9.02
Media Library /wp-admin/upload.php3.24 ▲0.0132.30 ▼3.41
Post Snapshots /wp-admin/options-general.php?page=post-snapshots3.1829.93

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts
recovery_mode_email_last_sent
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Post Snapshots
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.17 ▼1.211.68 ▲0.0640.13 ▲2.49
Dashboard /wp-admin2,215 ▲275.88 ▲0.8498.81 ▼9.0739.41 ▼4.52
Posts /wp-admin/edit.php2,095 ▲62.06 ▲0.0533.85 ▼1.0937.89 ▲5.39
Add New Post /wp-admin/post-new.php1,533 ▼023.22 ▼0.26618.71 ▼68.7154.71 ▼1.54
Media Library /wp-admin/upload.php1,394 ▲94.19 ▼0.0994.53 ▼8.0943.19 ▼0.33
Post Snapshots /wp-admin/options-general.php?page=post-snapshots7161.146.2922.48

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • recovery_mode_email_last_sent
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=post-snapshots
    • > Error in wp-content/plugins/post-snapshots/admin/settings.php+43
    Uncaught Error: Call to undefined function get_html_selector_for_array() in wp-content/plugins/post-snapshots/admin/settings.php:43
    Stack trace:
    #0 wp-includes/class-wp-hook.php(310): pos_show_admin_page()
    #1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 wp-admin/admin.php(259): do_action()
    #4 wp-admin/options-general.php(10): require_once('/var/www/wordpr...')
    #5 {main}
    thrown

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-snapshots/admin/settings.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_network_admin() in wp-content/plugins/post-snapshots/post-snapshots.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-snapshots/admin/post-meta-box.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-snapshots/legacy/duplicate-in-overview.php:122
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-snapshots/duplicate.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-snapshots/admin/post-meta-box.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: history, snapshot, revision, post-status

post-snapshots/post-snapshots.php 92% from 13 tests

"Post Snapshots" version 0.9's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 150 characters long)

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
Everything looks great! No dangerous files found in this plugin536 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP8117101529
CSS1107

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions28
▷ Named functions2382.14%
▷ Anonymous functions517.86%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin