93% cc-coming-soon

Code Review | Coming Soon Chop Chop

WordPress plugin Coming Soon Chop Chop scored 93% from 54 tests.

About plugin

  • Plugin page: cc-coming-soon
  • Plugin version: 2.2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.5.1
  • WordPress version: 5.9.2
  • First release: Jul 31, 2014
  • Latest release: Mar 3, 2021
  • Number of updates: 76
  • Update frequency: every 31.7 days
  • Top authors: chopchoporg (100%)

Code review

54 tests

User reviews

19 reviews

Install metrics

6,000+ active / 152,297 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲2.32MB] [CPU: ▼299.16ms] Passed 4 tests

This is a short check of server-side resources used by Coming Soon Chop Chop
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.1754.80 ▲4.19
Dashboard /wp-admin6.43 ▲3.0344.77 ▲10.55
Posts /wp-admin/edit.php6.72 ▲3.0849.77 ▲12.54
Add New Post /wp-admin/post-new.php9.99 ▲3.00109.71 ▼1,218.21
Media Library /wp-admin/upload.php6.42 ▲3.1236.70 ▲6.85
Coming Soon Chop Chop /wp-admin/options-general.php?page=cc_coming_soon9.23407.79

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 86 new files
Database: no new tables, 1 new option
New WordPress options
CcComingSoonAdminOptions

Browser metrics 75% from 4 tests

This is an overview of browser requirements for Coming Soon Chop Chop
It is time to focus on the following
  • Nodes: You must limit the number of DOM nodes under 25,000 (currently 28,748 on /wp-admin/options-general.php?page=cc_coming_soon)
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,769 ▲1615.97 ▼0.076.06 ▲0.182.28 ▼0.14
Dashboard /wp-admin2,897 ▲396.12 ▼0.07121.43 ▼13.05155.10 ▼1.13
Posts /wp-admin/edit.php2,693 ▲363.24 ▼0.0162.31 ▼4.63140.54 ▼5.03
Add New Post /wp-admin/post-new.php1,671 ▲1018.12 ▲1.49388.57 ▼26.57155.20 ▼1.93
Media Library /wp-admin/upload.php1,703 ▲85.52 ▼0.03139.45 ▼3.53189.36 ▼3.39
Coming Soon Chop Chop /wp-admin/options-general.php?page=cc_coming_soon28,74811.82297.87160.19

Uninstaller [IO: ▲0.00MB] [DB: ▲0.05MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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 take a closer look at the following
  • 9× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'AdminPageFramework' not found in wp-content/plugins/cc-coming-soon/admin/views/admin.php:14
    • > PHP Warning
      Use of undefined constant CC_CS_PLUGIN_URL - assumed 'CC_CS_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/cc-coming-soon/admin/views/templates.php on line 45
    • > PHP Fatal error
      Uncaught Error: Class 'AdminPageFramework' not found in wp-content/plugins/cc-coming-soon/admin/views/admin.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'AdminPageFramework_FieldType' not found in wp-content/plugins/cc-coming-soon/admin/includes/admin-page-framework/third-party/revealer-cutom-field-type/RevealerCustomFieldType.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/cc-coming-soon/admin/includes/admin-page-framework/admin-page-framework.min.php:2588
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/cc-coming-soon/public/themes/default/index.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Autoload\\AutoloadGenerator' not found in wp-content/plugins/cc-coming-soon/vendor/xrstf/composer-php52/lib/xrstf/Composer52/AutoloadGenerator.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/cc-coming-soon/admin/views/templates.php:50
    • > PHP Fatal error
      Uncaught Error: Class 'AdminPageFramework_FieldType' not found in wp-content/plugins/cc-coming-soon/admin/includes/admin-page-framework/third-party/google-web-font-custom-field-type/GoogleWebFontCustomFieldType.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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: Please reduce the number of tags, currently 11 tag instead of maximum 10
You can take inspiration from this readme.txt

cc-coming-soon/cc-coming-soon.php 92% from 13 tests

Analyzing the main PHP file in "Coming Soon Chop Chop" version 2.2.4
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected26,796 lines of code in 45 files:
LanguageFilesBlank linesComment linesLines of code
JSON50012,482
PHP251,1551,31012,137
CSS42642211,275
JavaScript9206114861
Markdown15024
SVG11017

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity14.78
▷ Minimum class complexity1.00
▷ Maximum class complexity107.00
Average method complexity3.22
▷ Minimum method complexity1.00
▷ Maximum method complexity46.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes138
▷ Abstract classes4734.06%
▷ Concrete classes9165.94%
▷ Final classes22.20%
Methods854
▷ Static methods10312.06%
▷ Public methods61772.25%
▷ Protected methods13415.69%
▷ Private methods10312.06%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants15
▷ Global constants320.00%
▷ Class constants1280.00%
▷ Public constants12100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
8 PNG files occupy 0.54MB with 0.32MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png36.09KB13.59KB▼ 62.34%
admin/assets/screenshots/default.png21.90KB8.46KB▼ 61.36%
admin/assets/screenshots/calm.png157.95KB57.93KB▼ 63.32%
public/themes/default/screenshot.png21.90KB8.46KB▼ 61.36%
assets/screenshot-3.png43.96KB21.23KB▼ 51.72%