78% studiofaca-security

Code Review | StudioFACA Security

WordPress plugin StudioFACA Security scored 78% from 53 tests.

About plugin

  • Plugin page: studiofaca-security
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.0
  • WordPress version: 5.8.1
  • First release: Aug 19, 2014
  • Latest release: Sep 4, 2014
  • Number of updates: 15
  • Update frequency: every 1.1 days
  • Top authors: faca5 (100%)

Code review

53 tests

User reviews

1 review

Install metrics

10+ active / 520 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
Installer ran successfully

Server metrics [RAM: ▼0.90MB] [CPU: ▼284.84ms] Passed 4 tests

A check of server-side resources used by StudioFACA Security
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1235.17 ▲14.94
Dashboard /wp-admin2.75 ▼0.3022.21 ▼21.19
Posts /wp-admin/edit.php2.75 ▼0.3521.30 ▼19.60
Add New Post /wp-admin/post-new.php2.75 ▼2.6820.97 ▼1,079.59
Media Library /wp-admin/upload.php2.75 ▼0.2521.26 ▼18.98

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 170 new files
Database: no new tables, 1 new option
New WordPress options
studiofaca_option_3

Browser metrics Passed 4 tests

This is an overview of browser requirements for StudioFACA Security
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,668 ▲6215.77 ▲0.257.25 ▼1.3148.16 ▲1.47
Dashboard /wp-admin2,942 ▲925.95 ▲0.12136.91 ▲0.68126.90 ▲15.41
Posts /wp-admin/edit.php2,726 ▲202.57 ▼0.1261.28 ▼3.4885.33 ▼2.63
Add New Post /wp-admin/post-new.php1,866 ▲21519.29 ▲2.09383.94 ▲26.98106.38 ▼5.84
Media Library /wp-admin/upload.php1,735 ▼375.03 ▼0.03131.24 ▼19.12129.41 ▲9.04

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > User deprecated in wp-includes/functions.php+5495
    has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/studiofaca-security/libs/cidr.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Parse error
      syntax error, unexpected end of file in wp-content/plugins/studiofaca-security/studiofaca_settings.php on line 494
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/studiofaca-security/studiofaca.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: security, studiofaca, wordpress, plugin

studiofaca-security/studiofaca.php 92% from 13 tests

The primary PHP file in "StudioFACA Security" version 0.2 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("studiofaca-security.php" instead of "studiofaca.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected1,348 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP41321991,348

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions32
▷ Named functions32100.00%
▷ Anonymous functions00.00%
Constants54
▷ Global constants54100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

PNG files should be compressed to save space and minimize bandwidth usage
162 compressed PNG files occupy 0.10MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/country/bj.png0.57KB0.69KB0.00%
images/country/vn.png0.59KB0.60KB0.00%
images/country/be.png0.56KB0.68KB0.00%
images/country/bo.png0.61KB0.71KB0.00%
images/country/sk.png0.63KB0.71KB0.00%