84% fakeblock

Code Review | Fakeblock

WordPress plugin Fakeblock scored84%from 54 tests.

About plugin

  • Plugin page: fakeblock
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.1
  • WordPress version: 6.3.1
  • First release: Mar 29, 2019
  • Latest release: Mar 29, 2019
  • Number of updates: 3
  • Update frequency: every 6.3 days
  • Top authors: thomasplevy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /676 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.33ms] Passed 4 tests

Server-side resources used by Fakeblock
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0336.20 ▼1.71
Dashboard /wp-admin3.32 ▲0.0147.39 ▼0.15
Posts /wp-admin/edit.php3.37 ▲0.0148.14 ▲1.93
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.21 ▼9.40
Media Library /wp-admin/upload.php3.24 ▲0.0138.30 ▲6.28

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Fakeblock: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,904 ▲15813.57 ▼0.845.26 ▲3.4733.61 ▼7.84
Dashboard /wp-admin2,222 ▲315.83 ▼0.08112.42 ▲6.6140.84 ▲5.45
Posts /wp-admin/edit.php2,108 ▲222.06 ▲0.0441.91 ▲4.9636.66 ▲0.96
Add New Post /wp-admin/post-new.php1,532 ▲1823.39 ▲5.98671.12 ▲6.6152.52 ▲1.67
Media Library /wp-admin/upload.php1,404 ▲134.22 ▲0.07107.67 ▲8.2946.10 ▲1.46

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 were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% 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 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function fkblk_get() in wp-content/plugins/fakeblock/includes/views/blocked.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

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
2 plugin tags: privacy, anti-piracy

fakeblock/fakeblock.php Passed 13 tests

The principal PHP file in "Fakeblock" v. 1.0.0 is loaded by WordPress automatically on each request
125 characters long description:
With less than 10 active installs, Fakeblock is the OC WordPress community's privacy software plugin that's also anti-piracy.

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 detected644 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP12160289333
CSS8128186
JavaScript46316120
Markdown1205

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity6.00
▷ Minimum class complexity4.00
▷ Maximum class complexity8.00
Average method complexity2.11
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes125.00%
Methods18
▷ Static methods15.56%
▷ Public methods1688.89%
▷ Protected methods00.00%
▷ Private methods211.11%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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