84% local-gajs

Code Review | Local GAjs

WordPress plugin Local GAjs scored84%from 54 tests.

About plugin

  • Plugin page: local-gajs
  • Plugin version: 0.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.1+
  • WordPress version: 6.3.1
  • First release: Sep 30, 2013
  • Latest release: Sep 30, 2013
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: bjornjohansen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,184 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.85ms] Passed 4 tests

Server-side resources used by Local GAjs
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0234.80 ▼3.42
Dashboard /wp-admin3.33 ▼0.0144.31 ▼14.19
Posts /wp-admin/edit.php3.39 ▲0.0247.05 ▼3.01
Add New Post /wp-admin/post-new.php5.92 ▲0.0391.65 ▼6.78
Media Library /wp-admin/upload.php3.26 ▲0.0236.44 ▲5.14

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
db_upgraded
local-gajs
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Local GAjs
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲6814.23 ▲0.121.82 ▲0.2338.90 ▲0.10
Dashboard /wp-admin2,198 ▲215.62 ▲0.0392.37 ▲3.9742.33 ▼2.85
Posts /wp-admin/edit.php2,100 ▼01.94 ▲0.0040.92 ▲5.1535.54 ▼2.23
Add New Post /wp-admin/post-new.php1,531 ▼1823.27 ▲5.01657.40 ▲26.0655.46 ▼16.74
Media Library /wp-admin/upload.php1,397 ▼64.16 ▼0.02101.47 ▼3.4947.26 ▲2.86

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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
Almost there! Just 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 register_activation_hook() in wp-content/plugins/local-gajs/local-gajs.php:37

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: performance, javascript, gajs, optimize, google analytics

local-gajs/local-gajs.php Passed 13 tests

The entry point to "Local GAjs" version 0.0.1 is a PHP file that has certain tags in its header comment area
104 characters long description:
Host the ga.js locally for improved load speed. Integrates with Analytics for WordPress by Joost de Valk

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
Success! There were no dangerous files found in this plugin140 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16022140

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity2.55
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods436.36%
▷ Public methods763.64%
▷ Protected methods436.36%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin