84% content-analytics

Code Review | Content Analytics

WordPress plugin Content Analytics scored84%from 54 tests.

About plugin

  • Plugin page: content-analytics
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.7
  • WordPress version: 6.3.1
  • First release: Apr 18, 2017
  • Latest release: Apr 18, 2017
  • Number of updates: 7
  • Update frequency: every 2.9 days
  • Top authors: smithworx (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,191 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.12MB] [CPU: ▼6.96ms] Passed 4 tests

An overview of server-side resources used by Content Analytics
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1340.41 ▼0.15
Dashboard /wp-admin3.43 ▲0.0944.71 ▼14.78
Posts /wp-admin/edit.php3.54 ▲0.1946.91 ▲1.01
Add New Post /wp-admin/post-new.php6.04 ▲0.1587.07 ▼13.24
Media Library /wp-admin/upload.php3.35 ▲0.1235.90 ▲0.34

Server storage [IO: ▲0.08MB] [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: 27 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Content Analytics
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,909 ▲16313.47 ▼0.797.92 ▲6.3236.77 ▼2.07
Dashboard /wp-admin2,210 ▲335.69 ▲0.0388.83 ▼0.4941.34 ▲2.41
Posts /wp-admin/edit.php2,112 ▲122.05 ▲0.0439.06 ▲0.3935.94 ▼3.86
Add New Post /wp-admin/post-new.php6,248 ▲4,73120.92 ▲1.91870.50 ▲426.2182.70 ▲33.07
Media Library /wp-admin/upload.php1,412 ▲184.31 ▲0.10101.23 ▲2.2446.55 ▲2.85

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 5× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/content-analytics/public/partials/content-analytics-public-display.php
    • > /wp-content/plugins/content-analytics/admin/partials/content-analytics-admin-display.php
    • > /wp-content/plugins/content-analytics/admin/partials/dashboard.php
    • > /wp-content/plugins/content-analytics/admin/partials/meta-box.php
    • > /wp-content/plugins/content-analytics/admin/partials/settings.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

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
8 plugin tags: lingotek, automation, multilingual, content, translation...

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

"Content Analytics" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
82 characters long description:
Empowers site administrators by providing insight and analytics into your content.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin667 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP15175611454
JavaScript22557118
CSS25995

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity4.71
▷ Minimum class complexity1.00
▷ Maximum class complexity25.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods43
▷ Static methods24.65%
▷ Public methods2865.12%
▷ Protected methods00.00%
▷ Private methods1534.88%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin