83% mp-customizer-backups

Code Review | MP Customizer Backups

WordPress plugin MP Customizer Backups scored 83% from 54 tests.

About plugin

  • Plugin page: mp-customizer-bac...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.4
  • WordPress version: 6.3.1
  • First release: Apr 1, 2015
  • Latest release: Mar 5, 2018
  • Number of updates: 18
  • Update frequency: every 59.4 days
  • Top authors: johnstonphilip (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active / 4,297 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.20MB] [CPU: ▲330.87ms] 75% from 4 tests

Analyzing server-side resources used by MP Customizer Backups
The following require your attention
  • Extra CPU: Extra CPU usage should be kept under 200.00ms (currently 330.87ms on /wp-admin/upload.php)
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1042.38 ▲2.55
Dashboard /wp-admin3.59 ▲0.28494.35 ▲437.16
Posts /wp-admin/edit.php3.63 ▲0.28493.68 ▲440.28
Add New Post /wp-admin/post-new.php6.10 ▲0.21544.01 ▲443.49
Media Library /wp-admin/upload.php3.44 ▲0.21517.79 ▲475.03

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by MP Customizer Backups
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲6414.41 ▲0.251.86 ▼0.1243.95 ▼3.95
Dashboard /wp-admin2,230 ▲425.82 ▲0.01101.55 ▼10.8242.36 ▼6.06
Posts /wp-admin/edit.php2,117 ▲682.04 ▼0.0141.62 ▲2.2436.55 ▲3.22
Add New Post /wp-admin/post-new.php1,551 ▲3120.93 ▼0.10730.74 ▲26.1053.23 ▼24.10
Media Library /wp-admin/upload.php1,414 ▲234.24 ▲0.07178.01 ▲70.7082.70 ▲31.83

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
Almost there! Just fix the following items
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/mp-customizer-backups/includes/plugin-checker/included-plugins/mp-core-check.php:42
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/mp-customizer-backups/mp-customizer-backups.php:41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mp-customizer-backups/includes/misc-functions/customizer-backups.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mp-customizer-backups/includes/plugin-checker/class-plugin-checker.php:862

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: theme mods, backups, customizer, backup

mp-customizer-backups/mp-customizer-backups.php 77% from 13 tests

"MP Customizer Backups" version 1.0.3'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:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("languages")
  • Domain Path: Prefix the domain path with a forward slash character ("/languages")

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 plugin834 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP6486759789
Markdown121037
JavaScript1548

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity37.50
▷ Minimum class complexity21.00
▷ Maximum class complexity54.00
Average method complexity7.08
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected