68% gp

Code Review | GP - GeePress

WordPress plugin GP - GeePress scored 68% from 54 tests.

About plugin

  • Plugin page: gp
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5.2
  • WordPress version: 6.3.1
  • First release: Oct 12, 2013
  • Latest release: Oct 12, 2013
  • Number of updates: 2
  • Update frequency: every 36.0 days
  • Top authors: louyx (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,198 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▼0.81MB] [CPU: ▼56.38ms] Passed 4 tests

Server-side resources used by GP - GeePress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1545.99 ▲3.69
Dashboard /wp-admin3.14 ▼0.1724.44 ▼25.02
Posts /wp-admin/edit.php3.14 ▼0.2226.27 ▼27.04
Add New Post /wp-admin/post-new.php3.14 ▼2.7527.27 ▼162.00
Media Library /wp-admin/upload.php3.14 ▼0.0924.76 ▼11.44
GeePress /wp-admin/options-general.php?page=gp3.1425.49
GeePress App /wp-admin/options-general.php?page=gpapp3.1424.39

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 90 new files
Database: no new tables, 7 new options
New WordPress options
gp_options
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by GP - GeePress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,845 ▲11014.74 ▲0.181.90 ▲0.1640.87 ▼3.17
Dashboard /wp-admin2,218 ▲304.85 ▼1.05128.74 ▲12.1051.09 ▲10.76
Posts /wp-admin/edit.php2,103 ▲142.00 ▼0.0536.04 ▼2.8332.74 ▲0.55
Add New Post /wp-admin/post-new.php1,546 ▲422.92 ▲4.56662.93 ▲56.7264.10 ▲13.19
Media Library /wp-admin/upload.php1,406 ▲154.16 ▼0.0595.03 ▼3.1841.71 ▼2.40
GeePress /wp-admin/options-general.php?page=gp8182.0325.5731.79
GeePress App /wp-admin/options-general.php?page=gpapp8982.1522.3631.41

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/gp/gp.php+141
    Function create_function() is deprecated
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • gp_options
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=gpapp
    • > Deprecated in wp-content/plugins/gp/gp.php+141
    Function create_function() is deprecated

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 64× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Google_ServiceResource' not found in wp-content/plugins/gp/google-api/contrib/Google_MirrorService.php:25
    • > PHP Fatal error
      require_once(): Failed opening required 'service/Google_Utils.php' (include_path='.:/usr/share/php') in wp-content/plugins/gp/google-api/auth/Google_OAuth2.php on line 20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/gp/gp.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Google_ServiceResource' not found in wp-content/plugins/gp/google-api/contrib/Google_PredictionService.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Google_ServiceResource' not found in wp-content/plugins/gp/google-api/contrib/Google_StorageService.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Google_ServiceResource' not found in wp-content/plugins/gp/google-api/contrib/Google_FreebaseService.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Google_ServiceResource' not found in wp-content/plugins/gp/google-api/contrib/Google_DriveService.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Google_ServiceResource' not found in wp-content/plugins/gp/google-api/contrib/Google_BloggerService.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Auth' not found in wp-content/plugins/gp/google-api/auth/Google_AuthNone.php:23
    • > PHP Fatal error
      require_once(): Failed opening required 'io/Google_HttpRequest.php' (include_path='.:/usr/share/php') in wp-content/plugins/gp/google-api/io/Google_IO.php on line 18

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Tags: There are too many tags (11 tag instead of maximum 10)
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === gp === )
The official readme.txt is a good inspiration

gp/gp.php Passed 13 tests

The principal PHP file in "GP - GeePress" v. 1.0 is loaded by WordPress automatically on each request
63 characters long description:
All the tools you need to integrate your wordpress and Google+.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin52,419 lines of code in 81 files:
LanguageFilesBlank linesComment linesLines of code
PHP802,44912,73852,270
PO File14952149

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.05
Average class complexity1.76
▷ Minimum class complexity1.00
▷ Maximum class complexity51.00
Average method complexity1.09
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1,381
▷ Abstract classes50.36%
▷ Concrete classes1,37699.64%
▷ Final classes00.00%
Methods11,321
▷ Static methods180.16%
▷ Public methods11,28599.68%
▷ Protected methods90.08%
▷ Private methods270.24%
Functions59
▷ Named functions59100.00%
▷ Anonymous functions00.00%
Constants18
▷ Global constants316.67%
▷ Class constants1583.33%
▷ Public constants15100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/googleplus.png3.39KB1.87KB▼ 44.94%
images/sign-in-with-google.png4.59KB2.53KB▼ 44.78%
images/sign-in-with-google-smaller.png4.54KB2.26KB▼ 50.32%
images/Red-signin_Google_base_44dp.png3.10KB2.38KB▼ 23.21%