84% simple-content-adder

Code Review | Simple Content Adder

WordPress plugin Simple Content Adder scored84%from 54 tests.

About plugin

  • Plugin page: simple-content-adder
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.6.1
  • WordPress version: 6.3.1
  • First release: Sep 28, 2016
  • Latest release: Sep 29, 2016
  • Number of updates: 4
  • Update frequency: every 0.5 days
  • Top authors: blazk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,168 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲1.46MB] [CPU: ▲6.14ms] Passed 4 tests

An overview of server-side resources used by Simple Content Adder
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.77 ▲1.3148.07 ▲10.27
Dashboard /wp-admin4.80 ▲1.4959.67 ▲12.67
Posts /wp-admin/edit.php4.91 ▲1.5550.05 ▼1.10
Add New Post /wp-admin/post-new.php7.45 ▲1.5690.44 ▲2.73
Media Library /wp-admin/upload.php4.73 ▲1.5048.04 ▲16.32
Dashboard /wp-admin/admin.php?page=sca_dashboard_admin_page4.6839.91
Add New /wp-admin/post-new.php?post_type=sca_content4.9654.13
Added Content /wp-admin/edit.php?post_type=sca_content4.7642.03

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simple Content Adder
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲6314.43 ▼0.301.77 ▼0.0243.77 ▼2.47
Dashboard /wp-admin2,224 ▲445.58 ▼0.0684.88 ▼5.7136.50 ▼5.81
Posts /wp-admin/edit.php2,132 ▲322.04 ▲0.0533.59 ▼1.7332.69 ▼5.13
Add New Post /wp-admin/post-new.php6,674 ▲5,14827.54 ▲3.871,002.53 ▲304.1042.20 ▼17.29
Media Library /wp-admin/upload.php1,429 ▲294.24 ▲0.06104.48 ▼5.8244.90 ▼0.16
Dashboard /wp-admin/admin.php?page=sca_dashboard_admin_page8882.0225.7430.62
Add New /wp-admin/post-new.php?post_type=sca_content2,9119.66279.3959.87
Added Content /wp-admin/edit.php?post_type=sca_content1,0981.9731.9029.39

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 42× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/simple-content-adder/lib/advanced-custom-fields/core/fields/taxonomy.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/simple-content-adder/lib/advanced-custom-fields/core/fields/password.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-content-adder/lib/advanced-custom-fields/core/controllers/export.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-content-adder/lib/advanced-custom-fields/core/controllers/location.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/simple-content-adder/lib/advanced-custom-fields/core/fields/tab.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/simple-content-adder/simple-content-adder.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-content-adder/lib/advanced-custom-fields/core/controllers/addons.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/simple-content-adder/lib/advanced-custom-fields/core/fields/number.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-content-adder/lib/advanced-custom-fields/core/controllers/field_group.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/simple-content-adder/lib/advanced-custom-fields/core/views/meta_box_options.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
The official readme.txt might help

simple-content-adder/simple-content-adder.php Passed 13 tests

The primary PHP file in "Simple Content Adder" version 1.0 is used by WordPress to initiate all plugin functionality
100 characters long description:
Add custom content to your posts, pages and/or footer, without the need to update each post or page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin38,543 lines of code in 92 files:
LanguageFilesBlank linesComment linesLines of code
PO File239,29713,65220,445
PHP444,1074,5899,537
JavaScript193,7482,6796,208
CSS66953802,353

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity24.37
▷ Minimum class complexity1.00
▷ Maximum class complexity106.00
Average method complexity4.26
▷ Minimum method complexity1.00
▷ Maximum method complexity62.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes38
▷ Abstract classes00.00%
▷ Concrete classes38100.00%
▷ Final classes00.00%
Methods272
▷ Static methods00.00%
▷ Public methods272100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions54
▷ Named functions54100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
21 PNG files occupy 0.20MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/advanced-custom-fields/images/sprite.png5.94KB2.82KB▼ 52.51%
lib/advanced-custom-fields/core/fields/date_picker/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
lib/advanced-custom-fields/images/arrows@2x.png0.84KB0.88KB0.00%
lib/advanced-custom-fields/core/fields/date_picker/images/ui-icons_cd0a0a_256x240.png4.27KB4.11KB▼ 3.78%
lib/advanced-custom-fields/screenshot-4.png25.14KB5.24KB▼ 79.16%