10% places-wp

Code Review | Places WP Lite

WordPress plugin Places WP Lite scored 10% from 54 tests.

About plugin

  • Plugin page: places-wp
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.5
  • WordPress version: 6.3.1
  • First release: Jan 13, 2013
  • Latest release: Jan 13, 2013
  • Number of updates: 9
  • Update frequency: every 0.1 days
  • Top authors: skall (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,182 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Compile error in wp-content/plugins/places-wp/lib/session.php+3
    Cannot declare class SessionHandler, because the name is already in use

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.73ms] Passed 4 tests

Analyzing server-side resources used by Places WP Lite
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.13 ▼0.12
Dashboard /wp-admin3.31 ▲0.0045.70 ▼1.23
Posts /wp-admin/edit.php3.36 ▲0.0045.94 ▲2.36
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.60 ▼19.46
Media Library /wp-admin/upload.php3.23 ▲0.0034.49 ▲1.91

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Places WP Lite
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.19 ▼0.984.67 ▲3.0038.86 ▼3.71
Dashboard /wp-admin2,209 ▲214.88 ▼1.0298.81 ▼17.6843.64 ▲1.97
Posts /wp-admin/edit.php2,092 ▲62.00 ▲0.0140.16 ▲2.8236.58 ▲3.23
Add New Post /wp-admin/post-new.php1,535 ▼923.18 ▲4.73659.13 ▲21.1957.75 ▲3.47
Media Library /wp-admin/upload.php1,385 ▼34.20 ▼0.05104.19 ▲5.3244.45 ▲0.11

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/places-wp/welcome.php
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant TRIVIAN_WIDGET_URL - assumed 'TRIVIAN_WIDGET_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/places-wp/welcome.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/places-wp/uninstall.php:3
    • > PHP Fatal error
      Cannot declare class SessionHandler, because the name is already in use in wp-content/plugins/places-wp/lib/session.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/places-wp/places-wp.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Tags: You are using too many tags: 26 tag instead of maximum 10
You can take inspiration from this readme.txt

places-wp/places-wp.php Passed 13 tests

The principal PHP file in "Places WP Lite" v. 1.0.1 is loaded by WordPress automatically on each request
105 characters long description:
Places is the most popular wordpress extension to enable places support into your wordpress website/blog.

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
There were no executable files found in this plugin297 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP86460297

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity2.75
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.64
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods11
▷ Static methods11100.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.40MB with 0.15MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
resources/images/bg.png409.25KB98.99KB▼ 75.81%
resources/images/placesIcon.png0.28KB0.29KB0.00%