84% family-friendly

Code Review | Family Friendly

WordPress plugin Family Friendly scored84%from 54 tests.

About plugin

  • Plugin page: family-friendly
  • Plugin version: 1.03
  • PHP compatiblity: 5.6.12+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.97
  • WordPress version: 6.3.1
  • First release: Nov 20, 2018
  • Latest release: Nov 20, 2018
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: jamibaraki (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /613 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.66ms] Passed 4 tests

A check of server-side resources used by Family Friendly
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0345.44 ▲7.89
Dashboard /wp-admin3.33 ▲0.0343.84 ▼2.53
Posts /wp-admin/edit.php3.38 ▲0.0344.78 ▼4.12
Add New Post /wp-admin/post-new.php5.91 ▲0.0281.30 ▼12.08
Media Library /wp-admin/upload.php3.25 ▲0.0236.66 ▲4.11

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_family-friendly-widget
family-friendly-options

Browser metrics Passed 4 tests

Checking browser requirements for Family Friendly
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.51 ▼0.871.92 ▲0.2042.76 ▲1.02
Dashboard /wp-admin2,212 ▲245.78 ▼0.1493.16 ▼7.9638.82 ▼4.89
Posts /wp-admin/edit.php2,095 ▲62.05 ▲0.0539.21 ▼1.9334.78 ▼1.92
Add New Post /wp-admin/post-new.php1,538 ▲522.94 ▼0.46664.94 ▲17.8555.81 ▼2.61
Media Library /wp-admin/upload.php1,394 ▲34.18 ▼0.0599.31 ▲4.4045.81 ▲2.40
Family Friendly /wp-admin/options-general.php?page=Family Friendly1,0372.0325.0025.35

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_family-friendly-widget
    • family-friendly-options

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function family_friendly_count_affected_posts() in wp-content/plugins/family-friendly/family-friendly-options-plugin.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/family-friendly/family-friendly-widget.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: filter, family, sfw

family-friendly/family-friendly.php Passed 13 tests

The main file in "Family Friendly" v. 1.03 serves as a complement to information provided in readme.txt and as the entry point to the plugin
74 characters long description:
Keep things family friendly. Allow users to select age ratings for content

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin554 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3107130541
CSS25613

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity5.40
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/18.png3.59KB2.50KB▼ 30.43%
img/U.png3.81KB2.33KB▼ 38.83%
img/PG.png3.98KB2.55KB▼ 35.98%