84% custom-content-width

Code Review | Custom Content Width

WordPress plugin Custom Content Width scored84%from 54 tests.

About plugin

  • Plugin page: custom-content-width
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-4.1
  • WordPress version: 6.3.1
  • First release: Jun 5, 2013
  • Latest release: Feb 5, 2015
  • Number of updates: 5
  • Update frequency: every 274.0 days
  • Top authors: iandunn (80%)georgestephanis (40%)

Code review

54 tests

User reviews

8 reviews

Install metrics

1,000+ active /22,375 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼9.35ms] Passed 4 tests

This is a short check of server-side resources used by Custom Content Width
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.94 ▼2.92
Dashboard /wp-admin3.32 ▼0.0246.39 ▼15.93
Posts /wp-admin/edit.php3.37 ▲0.0251.03 ▲1.76
Add New Post /wp-admin/post-new.php5.90 ▲0.0292.68 ▼16.01
Media Library /wp-admin/upload.php3.24 ▲0.0234.39 ▼2.54

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Custom Content Width
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▲0.091.66 ▲0.0141.84 ▲0.18
Dashboard /wp-admin2,206 ▲155.86 ▲0.97108.82 ▲1.6740.81 ▼0.46
Posts /wp-admin/edit.php2,086 ▼62.00 ▼0.0439.11 ▼0.6636.39 ▼1.32
Add New Post /wp-admin/post-new.php1,533 ▲1023.22 ▼0.02685.07 ▲31.2852.47 ▼13.31
Media Library /wp-admin/upload.php1,388 ▲34.16 ▼0.0696.66 ▼5.0441.06 ▼2.95

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-content-width/custom-content-width.php:16

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
2 plugin tags: content width, theme

custom-content-width/custom-content-width.php Passed 13 tests

"Custom Content Width" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
120 characters long description:
Adds a 'Custom Content Width' setting to the Settings > Media screen, to let users override their theme's content width.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin34 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP17834

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity4.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%
Functions0
▷ Named functions00.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
No PNG images were found in this plugin