78% custom-frames

Code Review | Custom Frames

WordPress plugin Custom Frames scored78%from 54 tests.

About plugin

  • Plugin page: custom-frames
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.4-4.7.1
  • WordPress version: 6.3.1
  • First release: Jan 13, 2017
  • Latest release: Jan 14, 2017
  • Number of updates: 7
  • Update frequency: N/A
  • Top authors: blakelong (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,652 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼10.71ms] Passed 4 tests

Server-side resources used by Custom Frames
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0441.31 ▼7.06
Dashboard /wp-admin3.46 ▲0.1251.24 ▼18.04
Posts /wp-admin/edit.php3.58 ▲0.2255.72 ▲1.74
Add New Post /wp-admin/post-new.php6.04 ▲0.1694.02 ▼19.49
Media Library /wp-admin/upload.php3.39 ▲0.1640.91 ▲3.80
Custom Frames /wp-admin/themes.php?page=customframes-settings3.3636.73

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 9 new options
New WordPress options
customframes-shadow-options
widget_theysaidso_widget
db_upgraded
customframes-border-options
theysaidso_admin_options
customframes-caption-options
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Custom Frames
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,912 ▲16613.48 ▼0.8910.70 ▲9.0941.31 ▲0.07
Dashboard /wp-admin2,196 ▲165.51 ▼0.1788.98 ▼5.4938.82 ▼2.28
Posts /wp-admin/edit.php2,104 ▲42.04 ▲0.0540.27 ▲0.4535.31 ▼2.76
Add New Post /wp-admin/post-new.php1,537 ▲1118.41 ▼5.15644.92 ▼70.6567.24 ▲20.38
Media Library /wp-admin/upload.php1,398 ▼24.17 ▼0.0297.90 ▼13.3644.26 ▼3.94
Custom Frames /wp-admin/themes.php?page=customframes-settings8852.0029.8528.20

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/themes.php?page=customframes-settings
    • > request to
    • > Notice in wp-config.php+20
    Undefined index: REQUEST_METHOD

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
The following issues need your attention
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/custom-frames/customframes.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-frames/class.customframes-admin.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/custom-frames/class.customframes.php:7

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 90% from 29 tests

readme.txt 88% 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: 12 tag instead of maximum 10
  • Donate link: Invalid URI ("staff@digital-scripts.com")
Please take inspiration from this readme.txt

custom-frames/customframes.php 92% from 13 tests

"Custom Frames" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("custom-frames.php" instead of "customframes.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin712 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP45733572
JavaScript200117
CSS10023

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity37.00
▷ Minimum class complexity28.00
▷ Maximum class complexity46.00
Average method complexity2.71
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods42
▷ Static methods511.90%
▷ Public methods42100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/header.png18.31KB6.62KB▼ 63.84%