10% eewee-pinterest

Code Review | eewee pinterest

WordPress plugin eewee pinterest scored 10% from 54 tests.

About plugin

  • Plugin page: eewee-pinterest
  • Plugin version: 1.3.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.0
  • WordPress version: 6.3.1
  • First release: Dec 2, 2012
  • Latest release: Sep 5, 2014
  • Number of updates: 28
  • Update frequency: every 22.9 days
  • Top authors: eewee (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 3,335 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/eewee-pinterest/controllers/EeweePinterest.php+2
    Use of undefined constant EeweePinterest - assumed 'EeweePinterest' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.93MB] [CPU: ▼56.65ms] Passed 4 tests

Analyzing server-side resources used by eewee pinterest
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.406.28 ▼40.22
Dashboard /wp-admin2.08 ▼1.238.26 ▼45.02
Posts /wp-admin/edit.php2.08 ▼1.287.00 ▼47.16
Add New Post /wp-admin/post-new.php2.08 ▼3.816.60 ▼94.19
Media Library /wp-admin/upload.php2.08 ▼1.156.31 ▼32.91
Manuel /wp-admin/admin.php?page=idSousMenuPinterest22.087.98
Eewee Pinterest /wp-admin/admin.php?page=idEeweePinterest2.089.02
Widget /wp-admin/admin.php?page=idSousMenuPinterest12.087.39

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for eewee pinterest
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,998 ▲20915.00 ▲1.7721.06 ▲19.2856.69 ▲10.15
Dashboard /wp-admin2,239 ▲335.84 ▼0.07119.73 ▲12.3991.28 ▲48.32
Posts /wp-admin/edit.php2,131 ▲421.97 ▼0.0340.02 ▼0.4136.31 ▲1.25
Add New Post /wp-admin/post-new.php1,543 ▲1023.96 ▲0.52700.52 ▼6.1157.53 ▲4.55
Media Library /wp-admin/upload.php1,415 ▲274.15 ▼0.06158.79 ▲50.7281.20 ▲35.47
Manuel /wp-admin/admin.php?page=idSousMenuPinterest29522.0130.4036.68
Eewee Pinterest /wp-admin/admin.php?page=idEeweePinterest9502.0129.4436.38
Widget /wp-admin/admin.php?page=idSousMenuPinterest19212.0527.0929.99

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Warning in wp-content/plugins/eewee-pinterest/controllers/EeweePinterest.php+2
    Use of undefined constant EeweePinterest - assumed 'EeweePinterest' (this will throw an Error in a future version of PHP)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=idSousMenuPinterest1
    • > Warning in wp-content/plugins/eewee-pinterest/controllers/EeweePinterest.php+2
    Use of undefined constant EeweePinterest - assumed 'EeweePinterest' (this will throw an Error in a future version of PHP)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=idSousMenuPinterest1
    • > Warning in wp-content/plugins/eewee-pinterest/controllers/EeweePinterest.php+27
    Use of undefined constant menu - assumed 'menu' (this will throw an Error in a future version of PHP)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=idSousMenuPinterest1
    • > Warning in wp-content/plugins/eewee-pinterest/controllers/EeweePinterest.php+29
    Use of undefined constant sousMenu1 - assumed 'sousMenu1' (this will throw an Error in a future version of PHP)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=idSousMenuPinterest1
    • > Warning in wp-content/plugins/eewee-pinterest/controllers/EeweePinterest.php+30
    Use of undefined constant sousMenu2 - assumed 'sousMenu2' (this will throw an Error in a future version of PHP)
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=idSousMenuPinterest1
    • > Notice in wp-content/plugins/eewee-pinterest/controllers/EeweePinterest.php+152
    Undefined property: EeweePinterest::$adminOptionsName
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=idSousMenuPinterest1
    • > Warning in wp-content/plugins/eewee-pinterest/forms/addPinterest.php+54
    Use of undefined constant PLUGIN_NOM_LANG - assumed 'PLUGIN_NOM_LANG' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/admin.php?page=idSousMenuPinterest1
    • > Notice in wp-content/plugins/eewee-pinterest/view/tableau.php+3
    Undefined index: type
    • > GET request to /wp-admin/admin.php?page=idSousMenuPinterest1
    • > Notice in wp-content/plugins/eewee-pinterest/forms/addPinterest.php+77
    Undefined variable: selectHeader

SRP 0% 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
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/eewee-pinterest/view/manuel.php
  • 8× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/eewee-pinterest/index.php on line 18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/eewee-pinterest/index.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'form_add_pinterest' not found in wp-content/plugins/eewee-pinterest/view/pinterest.php:15
    • > PHP Warning
      Use of undefined constant EeweePinterest - assumed 'EeweePinterest' (this will throw an Error in a future version of PHP) in wp-content/plugins/eewee-pinterest/controllers/EeweePinterest.php on line 2
    • > PHP Notice
      Undefined index: type in wp-content/plugins/eewee-pinterest/view/tableau.php on line 3
    • > PHP Warning
      include(EEWEE_PINTEREST_PLUGIN_DIR/view/pinterest.php): failed to open stream: No such file or directory in wp-content/plugins/eewee-pinterest/view/tableau.php on line 8
    • > PHP Warning
      include(): Failed opening 'EEWEE_PINTEREST_PLUGIN_DIR/view/pinterest.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/eewee-pinterest/view/tableau.php on line 8
    • > PHP Warning
      Use of undefined constant EEWEE_PINTEREST_PLUGIN_DIR - assumed 'EEWEE_PINTEREST_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/eewee-pinterest/view/tableau.php on line 8

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=idSousMenuPinterest1
    • > Network (severe)
    wp-content/plugins/eewee_pinterest/img/icon.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Add an image for screenshot #1 (Render of widget pinterest on wordpress website.)
The official readme.txt is a good inspiration

eewee-pinterest/index.php 92% from 13 tests

This is the main PHP file of "eewee pinterest" version 1.3.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("eewee-pinterest.php" instead of "index.php")

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 detected340 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP679122272
PO File1263168
CSS1210

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity9.00
▷ Minimum class complexity2.00
▷ Maximum class complexity16.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/icon.png6.26KB0.61KB▼ 90.20%