83% fantastic-content-protector-free

Code Review | Fantastic Content Protector Free

WordPress plugin Fantastic Content Protector Free scored 83% from 54 tests.

About plugin

  • Plugin page: fantastic-content...
  • Plugin version: 2.6
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.2-3.8
  • WordPress version: 5.8.1
  • First release: May 7, 2013
  • Latest release: May 7, 2014
  • Number of updates: 39
  • Update frequency: every 9.6 days
  • Top authors: fantastic plugins (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

8,000+ active / 24,434 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.04MB] [CPU: ▼189.47ms] Passed 4 tests

An overview of server-side resources used by Fantastic Content Protector Free
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.88 ▲0.0424.49 ▲3.33
Dashboard /wp-admin3.11 ▲0.0437.09 ▲1.60
Posts /wp-admin/edit.php3.16 ▲0.0531.16 ▼2.24
Add New Post /wp-admin/post-new.php5.47 ▲0.0372.04 ▼756.49
Media Library /wp-admin/upload.php3.05 ▲0.0422.64 ▼0.74
Fantastic Content Protector Free /wp-admin/options-general.php?page=content_protector_free3.0223.50

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 5 new options
New WordPress options
credit_text_new
credits_nofollow_new
credits_name_new
credit_link_content_protect
credits_defaults_new

Browser metrics Passed 4 tests

Fantastic Content Protector Free: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,677 ▲7615.57 ▼0.064.85 ▲0.0475.36 ▼1.49
Dashboard /wp-admin2,935 ▲396.12 ▼0.06114.28 ▼19.30164.58 ▼15.78
Posts /wp-admin/edit.php2,748 ▲83.22 ▼0.0161.82 ▼3.82137.17 ▼12.51
Add New Post /wp-admin/post-new.php3,810 ▲6718.58 ▼0.78433.17 ▲4.40158.84 ▼0.81
Media Library /wp-admin/upload.php1,757 ▲55.49 ▼0.07158.64 ▲18.22196.28 ▲7.39
Fantastic Content Protector Free /wp-admin/options-general.php?page=content_protector_free1,2072.4356.45121.00

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 5 options in the database
    • credit_link_content_protect
    • credit_text_new
    • credits_defaults_new
    • credits_nofollow_new
    • credits_name_new

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/fantastic-content-protector-free/fantasticcontentprotectorfree.php:157

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === fantastic-content-protector-free === )
You can look at the official readme.txt

fantastic-content-protector-free/fantasticcontentprotectorfree.php 85% from 13 tests

"Fantastic Content Protector Free" version 2.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("fantastic-content-protector-free.php" instead of "fantasticcontentprotectorfree.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 252 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected447 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP23316271
CSS1320176

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods480.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
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
assets/favicon.png19.01KB6.16KB▼ 67.58%