90% fb-analytics

Code Review | Simple Analytics

WordPress plugin Simple Analytics scored90%from 54 tests.

About plugin

  • Plugin page: fb-analytics
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.3.2
  • WordPress version: 6.3.1
  • First release: Jan 4, 2018
  • Latest release: Dec 30, 2019
  • Number of updates: 13
  • Update frequency: every 55.9 days
  • Top authors: bhvreddy (92.31%)yankovski (15.38%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,452 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 gracefully, with no errors

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

This is a short check of server-side resources used by Simple Analytics
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.27 ▼7.32
Dashboard /wp-admin3.35 ▲0.0550.62 ▲1.89
Posts /wp-admin/edit.php3.46 ▲0.1150.26 ▼1.52
Add New Post /wp-admin/post-new.php5.93 ▲0.0491.09 ▲0.22
Media Library /wp-admin/upload.php3.27 ▲0.0437.84 ▲1.33

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 8 new options
New WordPress options
ht_fba_plugin_details
widget_recent-comments
widget_theysaidso_widget
ht_fba_options
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Simple Analytics: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.35 ▼0.181.82 ▲0.1743.38 ▼0.21
Dashboard /wp-admin2,214 ▲375.61 ▼0.0487.24 ▼5.5840.06 ▲1.22
Posts /wp-admin/edit.php2,119 ▲162.01 ▼0.0236.34 ▼0.2435.69 ▲0.64
Add New Post /wp-admin/post-new.php1,539 ▲923.03 ▲0.10698.53 ▲15.2359.25 ▲2.09
Media Library /wp-admin/upload.php1,416 ▲194.22 ▼0.01110.12 ▼2.7748.62 ▲3.02

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 8 options
    • db_upgraded
    • ht_fba_options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • ht_fba_plugin_details

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration Passed 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: analytics, facebook, fb analytics, facebook analytics

fb-analytics/fb-analytics.php Passed 13 tests

The main PHP file in "Simple Analytics" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
43 characters long description:
Add Facebook Analaytics in Web Applications

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected254 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP8159223254

PHP code Passed 2 tests

An short overview of 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.34
Average class complexity4.40
▷ Minimum class complexity1.00
▷ Maximum class complexity9.00
Average method complexity1.68
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods25
▷ Static methods1248.00%
▷ Public methods2392.00%
▷ Protected methods00.00%
▷ Private methods28.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
PNG images were not found in this plugin