90% fx-private-site

Code Review | f(x) Private Site

WordPress plugin f(x) Private Site scored 90% from 54 tests.

About plugin

  • Plugin page: fx-private-site
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7
  • WordPress version: 6.3.1
  • First release: Jan 16, 2016
  • Latest release: Jul 31, 2017
  • Number of updates: 15
  • Update frequency: every 37.9 days
  • Top authors: turtlepod (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

1,000+ active / 24,632 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.37ms] Passed 4 tests

Server-side resources used by f(x) Private Site
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0238.84 ▼1.55
Dashboard /wp-admin3.35 ▲0.0448.06 ▼6.88
Posts /wp-admin/edit.php3.40 ▲0.0449.99 ▲4.13
Add New Post /wp-admin/post-new.php5.93 ▲0.0485.55 ▼14.50
Media Library /wp-admin/upload.php3.27 ▲0.0435.64 ▲1.45

Server storage [IO: ▲0.04MB] [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, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for f(x) Private Site
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲7113.18 ▼1.251.69 ▼0.3141.71 ▼0.31
Dashboard /wp-admin2,206 ▲154.89 ▼1.01107.75 ▼5.4438.59 ▼8.81
Posts /wp-admin/edit.php2,092 ▲32.06 ▼0.0040.67 ▲3.9736.37 ▲1.35
Add New Post /wp-admin/post-new.php1,534 ▼1623.28 ▲5.24697.70 ▲24.6154.28 ▼2.34
Media Library /wp-admin/upload.php1,388 ▼34.32 ▲0.1692.92 ▼9.1141.87 ▼2.12

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: members only, private site, protect rss

fx-private-site/fx-private-site.php Passed 13 tests

The primary PHP file in "f(x) Private Site" version 1.2.1 is used by WordPress to initiate all plugin functionality
74 characters long description:
Set your site to member only. All visitor will need to login to view site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected218 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP365143150
PO File18852
Markdown14013
CSS1003

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.29
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin