83% post-analytics

Code Review | Post-Analytics

WordPress plugin Post-Analytics scored83%from 54 tests.

About plugin

  • Plugin page: post-analytics
  • Plugin version: 1.01
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7.0-3.7.0
  • WordPress version: 6.3.1
  • First release: Dec 31, 2013
  • Latest release: Apr 6, 2014
  • Number of updates: 31
  • Update frequency: every 3.1 days
  • Top authors: drmosko (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /4,956 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

Server-side resources used by Post-Analytics
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0538.64 ▼5.35
Dashboard /wp-admin3.36 ▲0.0148.21 ▼13.49
Posts /wp-admin/edit.php3.41 ▲0.0550.35 ▼3.66
Add New Post /wp-admin/post-new.php5.94 ▲0.05102.93 ▲3.47
Media Library /wp-admin/upload.php3.28 ▲0.0538.02 ▲5.58
Post-Analytics /wp-admin/options-general.php?page=Post_Analytics_admin3.2532.85

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
Post_Analytics_settings
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Post-Analytics
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4314.34 ▼0.041.81 ▲0.0441.75 ▼2.32
Dashboard /wp-admin2,199 ▲225.65 ▲0.1289.65 ▼2.2543.66 ▲1.80
Posts /wp-admin/edit.php2,104 ▲12.01 ▼0.0235.19 ▼5.2132.51 ▼5.55
Add New Post /wp-admin/post-new.php1,412 ▼11417.92 ▼5.04585.34 ▼87.1443.46 ▼14.33
Media Library /wp-admin/upload.php1,404 ▲44.20 ▼0.00114.54 ▲6.1149.11 ▲4.20
Post-Analytics /wp-admin/options-general.php?page=Post_Analytics_admin9582.0027.9027.96

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/post-analytics/Post-Analytics.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-analytics/Post-Analytics-admin-page.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/post-analytics/Post-Analytics-results.php:4

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
10 plugin tags: google analytics dashboard, seo, google analytics, seo stats, google...

post-analytics/Post-Analytics.php 77% from 13 tests

This is the main PHP file of "Post-Analytics" version 1.01, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Main file name: The principal plugin file should be the same as the plugin slug ("post-analytics.php" instead of "Post-Analytics.php")
  • Domain Path: The domain path points to a folder that does not exist ("/lang")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected810 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP4206253761
CSS10049

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity21.33
▷ Minimum class complexity4.00
▷ Maximum class complexity55.00
Average method complexity3.44
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods25
▷ Static methods14.00%
▷ Public methods1768.00%
▷ Protected methods624.00%
▷ Private methods28.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants00.00%
▷ Class constants6100.00%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected