84% fb-instant-articles-pubexchange-filter

Code Review | Add PubExchange Tracking to Instant Articles for WP

WordPress plugin Add PubExchange Tracking to Instant Articles for WP scored84%from 54 tests.

About plugin

  • Plugin page: fb-instant-articl...
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.4
  • WordPress version: 6.3.1
  • First release: Mar 14, 2016
  • Latest release: Jan 14, 2017
  • Number of updates: 6
  • Update frequency: every 51.0 days
  • Top authors: pubexchange (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /893 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼1.61ms] Passed 4 tests

Analyzing server-side resources used by Add PubExchange Tracking to Instant Articles for WP
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.0046.08 ▲2.04
Dashboard /wp-admin3.57 ▲0.0155.25 ▲1.26
Posts /wp-admin/edit.php3.68 ▲0.0048.46 ▼4.13
Add New Post /wp-admin/post-new.php6.15 ▲0.0090.70 ▼5.59
Media Library /wp-admin/upload.php3.49 ▲0.0042.07 ▲7.84

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Add PubExchange Tracking to Instant Articles for WP: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.38 ▲0.092.01 ▲0.3543.27 ▼6.62
Dashboard /wp-admin2,198 ▲215.69 ▼0.1089.85 ▲0.5940.31 ▼0.77
Posts /wp-admin/edit.php2,100 ▼02.02 ▼0.0236.37 ▼0.4038.09 ▲1.56
Add New Post /wp-admin/post-new.php1,531 ▲522.95 ▲5.50636.83 ▼65.6953.66 ▼3.61
Media Library /wp-admin/upload.php1,403 ▲34.26 ▲0.01105.70 ▼9.1847.61 ▼0.01

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/fb-instant-articles-pubexchange-filter/pubexchange-filter.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: instant articles, facebook, mobile

fb-instant-articles-pubexchange-filter/pubexchange-filter.php 85% from 13 tests

The main PHP script in "Add PubExchange Tracking to Instant Articles for WP" version 0.2 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("fb-instant-articles-pubexchange-filter.php" instead of "pubexchange-filter.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected19 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP121019

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
No PNG images were found in this plugin