84% customize-snapshots

Code Review | Customize Snapshots

WordPress plugin Customize Snapshots scored84%from 54 tests.

About plugin

  • Plugin page: customize-snapshots
  • Plugin version: 0.7.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.9
  • WordPress version: 6.3.1
  • First release: Nov 9, 2015
  • Latest release: Nov 16, 2017
  • Number of updates: 40
  • Update frequency: every 18.5 days
  • Top authors: westonruter (75%)valendesigns (27.5%)

Code review

54 tests

User reviews

3 reviews

Install metrics

500+ active /21,965 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.07MB] [CPU: ▼4.75ms] Passed 4 tests

An overview of server-side resources used by Customize Snapshots
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0841.99 ▲3.98
Dashboard /wp-admin3.37 ▲0.0353.68 ▼15.46
Posts /wp-admin/edit.php3.49 ▲0.1351.95 ▲0.99
Add New Post /wp-admin/post-new.php6.04 ▲0.1595.43 ▼7.93
Media Library /wp-admin/upload.php3.29 ▲0.0741.81 ▲3.42
Changesets /wp-admin/edit.php?post_type=customize_changeset3.3440.30

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 26 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Customize Snapshots
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,855 ▲9413.31 ▼1.051.84 ▼0.2041.40 ▼2.01
Dashboard /wp-admin2,247 ▲445.79 ▼0.07108.40 ▲4.0237.53 ▼4.27
Posts /wp-admin/edit.php2,132 ▲321.98 ▼0.0240.81 ▲6.3433.84 ▼5.42
Add New Post /wp-admin/post-new.php1,575 ▲4223.49 ▲0.24643.12 ▼40.9570.92 ▲7.62
Media Library /wp-admin/upload.php1,429 ▲294.25 ▲0.03100.66 ▼8.8740.05 ▼4.49
Changesets /wp-admin/edit.php?post_type=customize_changeset1,0981.9832.6429.41

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Please fix the following items
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function CustomizeSnapshots\\add_filter() in wp-content/plugins/customize-snapshots/php/class-plugin.php:40
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Posts_Controller' not found in wp-content/plugins/customize-snapshots/php/class-snapshot-rest-api-controller.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function CustomizeSnapshots\\add_filter() in wp-content/plugins/customize-snapshots/php/class-plugin.php:40
    • > PHP Fatal error
      Uncaught Error: Class 'CustomizeSnapshots\\Customize_Snapshot_Manager' not found in wp-content/plugins/customize-snapshots/php/class-customize-snapshot-manager-compat.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'CustomizeSnapshots\\Plugin_Base' not found in wp-content/plugins/customize-snapshots/php/class-plugin.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Screenshots: Add an image for screenshot #1 (The “Save & Publish” button becomes a combo-button that allows you to select the status for the changeset when saving. In addition to publishing, a changeset can be saved as a permanent draft (as opposed to just an auto-draft), pending review, scheduled for future publishing. A revision is made each time you press the button.)
You can take inspiration from this readme.txt

customize-snapshots/customize-snapshots.php Passed 13 tests

Analyzing the main PHP file in "Customize Snapshots" version 0.7.0
72 characters long description:
Allow Customizer states to be drafted, and previewed with a private URL.

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 plugin3,366 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP92779601,840
JavaScript82832621,191
CSS8602335

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity41.00
▷ Minimum class complexity1.00
▷ Maximum class complexity137.00
Average method complexity3.62
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes7
▷ Abstract classes114.29%
▷ Concrete classes685.71%
▷ Final classes00.00%
Methods104
▷ Static methods21.92%
▷ Public methods10298.08%
▷ Protected methods21.92%
▷ Private methods00.00%
Functions9
▷ Named functions666.67%
▷ Anonymous functions333.33%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin