78% fan-page

Code Review | Fan Page

WordPress plugin Fan Page scored78%from 54 tests.

About plugin

  • Plugin page: fan-page
  • Plugin version: 1.0.1
  • PHP compatiblity: 6.8+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Mar 28, 2021
  • Latest release: Apr 3, 2021
  • Number of updates: 9
  • Update frequency: every 0.8 days
  • Top authors: delower186 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /787 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼5.91ms] Passed 4 tests

This is a short check of server-side resources used by Fan Page
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0936.00 ▼3.73
Dashboard /wp-admin3.39 ▲0.0443.96 ▼11.93
Posts /wp-admin/edit.php3.50 ▲0.1547.24 ▲2.54
Add New Post /wp-admin/post-new.php5.97 ▲0.0880.28 ▼10.52
Media Library /wp-admin/upload.php3.31 ▲0.0841.03 ▲8.60

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_fanpage_widget
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Fan Page
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲6513.24 ▼1.441.53 ▼0.1537.32 ▼5.44
Dashboard /wp-admin2,211 ▲235.81 ▲0.9399.34 ▼14.1839.79 ▲0.17
Posts /wp-admin/edit.php2,099 ▲102.02 ▲0.0242.38 ▲2.9937.73 ▲2.38
Add New Post /wp-admin/post-new.php1,543 ▲2423.28 ▲0.01685.47 ▲5.2041.24 ▼13.28
Media Library /wp-admin/upload.php1,402 ▲144.23 ▲0.0299.00 ▼12.5040.63 ▼8.96

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_fanpage_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 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
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/fan-page/fan-page.php
  • 9× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Undefined variable: show_facepile in wp-content/plugins/fan-page/views/view-fan-page.php on line 4
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/fan-page/views/view-menu.php:6
    • > PHP Notice
      Undefined variable: small_header in wp-content/plugins/fan-page/views/view-fan-page.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/fan-page/base/FanPageWidget.php:19
    • > PHP Notice
      Undefined variable: messages in wp-content/plugins/fan-page/views/view-fan-page.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/fan-page/views/view-fan-page.php:11
    • > PHP Notice
      Undefined variable: timeline in wp-content/plugins/fan-page/views/view-fan-page.php on line 6
    • > PHP Notice
      Undefined variable: events in wp-content/plugins/fan-page/views/view-fan-page.php on line 7
    • > PHP Notice
      Undefined variable: hide_cover in wp-content/plugins/fan-page/views/view-fan-page.php on line 3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed:
  • Requires at least: Invalid plugin version format
You can look at the official readme.txt

fan-page/fan-page.php 92% from 13 tests

"Fan Page" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin490 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP5141179439
CSS10051

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity1.90
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods20
▷ Static methods15.00%
▷ Public methods1890.00%
▷ Protected methods210.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/help_icon.png0.75KB0.79KB0.00%