84% content-freeze

Code Review | Content Freeze

WordPress plugin Content Freeze scored84%from 54 tests.

About plugin

  • Plugin page: content-freeze
  • Plugin version: 0.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.2-5.1.1
  • WordPress version: 6.3.1
  • First release: May 3, 2015
  • Latest release: Apr 22, 2019
  • Number of updates: 13
  • Update frequency: every 111.9 days
  • Top authors: wholegraindigital (69.23%)MatheusFD (38.46%)

Code review

54 tests

User reviews

5 reviews

Install metrics

200+ active /24,260 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.02MB] [CPU: ▲2.48ms] Passed 4 tests

A check of server-side resources used by Content Freeze
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.15 ▲1.16
Dashboard /wp-admin3.33 ▲0.0351.55 ▲2.86
Posts /wp-admin/edit.php3.44 ▲0.0949.11 ▲0.03
Add New Post /wp-admin/post-new.php5.91 ▲0.02123.03 ▲23.73
Media Library /wp-admin/upload.php3.25 ▲0.0340.90 ▲5.87
Content Freeze /wp-admin/options-general.php?page=content_freeze3.2029.58

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
content_freeze_options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Content Freeze
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.24 ▼0.531.87 ▲0.2141.75 ▼0.35
Dashboard /wp-admin2,199 ▲225.63 ▲0.0191.50 ▲4.8939.48 ▼4.17
Posts /wp-admin/edit.php2,104 ▲41.97 ▲0.0139.42 ▲4.0935.13 ▲3.36
Add New Post /wp-admin/post-new.php1,531 ▲323.15 ▼0.03754.17 ▲54.3265.01 ▲12.27
Media Library /wp-admin/upload.php1,404 ▲14.24 ▲0.08115.97 ▲12.8146.43 ▲3.51
Content Freeze /wp-admin/options-general.php?page=content_freeze8922.1437.0627.10

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • content_freeze_options
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=content_freeze
    • > Notice in wp-content/plugins/content-freeze/settings.php+121
    Undefined index: mbox_example_text

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: maintenance, migration, content freeze, code lock, content lock

content-freeze/content-freeze.php Passed 13 tests

The primary PHP file in "Content Freeze" version 0.1.3 is used by WordPress to initiate all plugin functionality
104 characters long description:
The content freeze plugin would allow an admin to 'lock' all content on the site for a given time period

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected215 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP26160215

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity10.00
▷ Minimum class complexity7.00
▷ Maximum class complexity13.00
Average method complexity1.69
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods26
▷ Static methods00.00%
▷ Public methods2388.46%
▷ Protected methods311.54%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
There are no PNG files in this plugin