10% easy-cc-license

Code Review | Easy CC License

WordPress plugin Easy CC License scored10%from 54 tests.

About plugin

  • Plugin page: easy-cc-license
  • Plugin version: 0.91
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.8.1
  • WordPress version: 6.3.1
  • First release: Feb 21, 2012
  • Latest release: Jan 25, 2014
  • Number of updates: 15
  • Update frequency: every 47.9 days
  • Top authors: MakerBlock (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active /4,546 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > Warning in wp-content/plugins/easy-cc-license/ez_cc_license.php+65
    Use of undefined constant WPLANG - assumed 'WPLANG' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼0.26MB] [CPU: ▼11.73ms] Passed 4 tests

This is a short check of server-side resources used by Easy CC License
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.01 ▼7.17
Dashboard /wp-admin3.38 ▲0.0856.39 ▲4.36
Posts /wp-admin/edit.php3.43 ▲0.0752.62 ▲2.54
Add New Post /wp-admin/post-new.php4.67 ▼1.2147.04 ▼43.08
Media Library /wp-admin/upload.php3.30 ▲0.0737.99 ▲0.80
Easy CC License /wp-admin/options-general.php?page=ez-cc-license-settings-page3.2529.79

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
mbk_ez_cc_options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Easy CC License
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5813.32 ▼1.345.50 ▲3.2647.78 ▲2.90
Dashboard /wp-admin2,228 ▲314.86 ▼1.00121.16 ▲0.6648.96 ▲2.31
Posts /wp-admin/edit.php2,104 ▲41.97 ▼0.0941.10 ▲5.1235.37 ▲0.32
Add New Post /wp-admin/post-new.php1,553 ▲2721.39 ▲3.69647.67 ▲45.8558.22 ▲9.82
Media Library /wp-admin/upload.php1,404 ▲14.23 ▼0.1999.45 ▲1.6144.11 ▲2.08
Easy CC License /wp-admin/options-general.php?page=ez-cc-license-settings-page1,3022.0225.4426.77

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=ez-cc-license-settings-page
    • > Notice in wp-content/plugins/easy-cc-license/ez_cc_license.php+200
    Undefined index: ez_cc_admin_options_nonce
    • > GET request to /wp-admin/options-general.php?page=ez-cc-license-settings-page
    • > Notice in wp-content/plugins/easy-cc-license/ez_cc_license.php+212
    Undefined index: action
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=ez-cc-license-settings-page
    • > Notice in wp-content/plugins/easy-cc-license/ez_cc_license.php+248
    Undefined index: field_location
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=ez-cc-license-settings-page
    • > Notice in wp-content/plugins/easy-cc-license/ez_cc_license.php+287
    Undefined index: field_format
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=ez-cc-license-settings-page
    • > Notice in wp-content/plugins/easy-cc-license/ez_cc_license.php+293
    Undefined index: field_worktitle
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=ez-cc-license-settings-page
    • > Notice in wp-content/plugins/easy-cc-license/ez_cc_license.php+299
    Undefined index: field_attribute_to_name
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=ez-cc-license-settings-page
    • > Notice in wp-content/plugins/easy-cc-license/ez_cc_license.php+305
    Undefined index: field_attribute_to_url
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=ez-cc-license-settings-page
    • > Notice in wp-content/plugins/easy-cc-license/ez_cc_license.php+311
    Undefined index: field_sourceurl
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=ez-cc-license-settings-page
    • > Notice in wp-content/plugins/easy-cc-license/ez_cc_license.php+317
    Undefined index: field_morepermissionsurl

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
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/easy-cc-license/ez_cc_license.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: Screenshot #1 (What the shortcode looks like on a published post) image not found
  • Plugin Name: Please specify the plugin name on the first line ( === easy-cc-license === )
You can look at the official readme.txt

easy-cc-license/ez_cc_license.php 92% from 13 tests

"Easy CC License" version 0.91's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("easy-cc-license.php" instead of "ez_cc_license.php")

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
Success! There were no dangerous files found in this plugin241 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1881241

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity64.00
▷ Minimum class complexity64.00
▷ Maximum class complexity64.00
Average method complexity10.00
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods7100.00%
▷ Public methods7100.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
1 PNG file occupies 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png64.25KB25.70KB▼ 60.00%