78% content-insights

Code Review | Content Insights

WordPress plugin Content Insights scored 78% from 54 tests.

About plugin

  • Plugin page: content-insights
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8.1
  • WordPress version: 5.8.1
  • First release: Aug 10, 2017
  • Latest release: Nov 18, 2021
  • Number of updates: 20
  • Update frequency: every 78.3 days
  • Top authors: contentinsights (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active / 2,753 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
Install script ran successfully

Server metrics [RAM: ▼0.79MB] [CPU: ▼173.52ms] Passed 4 tests

An overview of server-side resources used by Content Insights
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.88 ▲0.1632.28 ▲3.27
Dashboard /wp-admin2.85 ▼0.2023.97 ▼21.31
Posts /wp-admin/edit.php2.86 ▼0.2523.30 ▼22.07
Add New Post /wp-admin/post-new.php2.85 ▼2.5820.10 ▼632.55
Media Library /wp-admin/upload.php2.85 ▼0.1523.54 ▼18.13
Content Insights /wp-admin/options-general.php?page=contentinsights_add_tracker2.8624.95

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Content Insights
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,717 ▲11116.05 ▲0.059.37 ▼1.3848.60 ▼1.89
Dashboard /wp-admin2,984 ▲506.00 ▼0.14136.19 ▼3.47113.77 ▼5.30
Posts /wp-admin/edit.php2,753 ▲172.72 ▲0.0163.96 ▼1.9689.06 ▼6.81
Add New Post /wp-admin/post-new.php1,881 ▲38319.20 ▲0.42382.04 ▲9.67106.87 ▼5.78
Media Library /wp-admin/upload.php1,821 ▲145.02 ▼0.10147.68 ▲5.61122.63 ▲5.90
Content Insights /wp-admin/options-general.php?page=contentinsights_add_tracker1,2982.1055.1088.96

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
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/content-insights/contentinsights.php+296
    Trying to access array offset on value of type bool

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=contentinsights_add_tracker
    • > Notice in wp-content/plugins/content-insights/contentinsights.php+133
    Trying to access array offset on value of type bool

SRP 50% from 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
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/content-insights/contentinsights.php:307

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 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: content quality, content analytics

content-insights/contentinsights.php 77% from 13 tests

"Content Insights" version 1.2.2'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:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("content-insights.php" instead of "contentinsights.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Domain Path: The domain path folder was not found ("/languages")

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
Success! There were no dangerous files found in this plugin247 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP26411247

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected