10% the-world

Code Review | The World

WordPress plugin The World scored 10% from 54 tests.

About plugin

  • Plugin page: the-world
  • Plugin version: 0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.0
  • WordPress version: 5.8.1
  • First release: May 24, 2013
  • Latest release: Oct 9, 2014
  • Number of updates: 45
  • Update frequency: every 11.2 days
  • Top authors: doatv (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 2,902 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/the-world/theworld-widget.php+2
    Methods with the same name as their class will not be constructors in a future version of PHP; TheWorldWidget has a deprecated constructor

Server metrics [RAM: ▼1.75MB] [CPU: ▼693.83ms] Passed 4 tests

Analyzing server-side resources used by The World
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /1.89 ▼0.835.92 ▼19.45
Dashboard /wp-admin1.91 ▼1.156.63 ▼41.03
Posts /wp-admin/edit.php1.91 ▼1.208.08 ▼40.46
Add New Post /wp-admin/post-new.php1.91 ▼3.535.77 ▼2,657.43
Media Library /wp-admin/upload.php1.91 ▼1.107.15 ▼36.38

Server storage [IO: ▲0.13MB] [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, 1 new option
New WordPress options
widget_theworldwidget

Browser metrics Passed 4 tests

Checking browser requirements for The World
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,698 ▲10215.83 ▲0.387.54 ▼1.6148.95 ▼0.02
Dashboard /wp-admin2,979 ▲485.91 ▼0.02141.42 ▼5.76136.87 ▲21.28
Posts /wp-admin/edit.php2,759 ▲202.70 ▲0.0269.49 ▲3.8899.23 ▲4.26
Add New Post /wp-admin/post-new.php1,696 ▲1318.71 ▼0.05391.04 ▲11.77119.24 ▲4.75
Media Library /wp-admin/upload.php1,770 ▼375.02 ▲0.03142.47 ▼11.81154.37 ▲11.72

Uninstaller [IO: ▲0.00MB] [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 validation failed for this plugin
    • > Deprecated in wp-content/plugins/the-world/theworld-widget.php+2
    Methods with the same name as their class will not be constructors in a future version of PHP; TheWorldWidget has a deprecated constructor
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • widget_theworldwidget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/the-world/theworld-widget.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/the-world/theworld-widget.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/the-world/theworld-shortcode.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Admin Panel), #2 (Admin Panel), #3 (Use Image)
The official readme.txt is a good inspiration

the-world/theworld.php 92% from 13 tests

The entry point to "The World" version 0.4 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("the-world.php" instead of "theworld.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
Good job! No executable or dangerous file extensions detected488 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP5468488

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity4.50
▷ Minimum class complexity2.00
▷ Maximum class complexity7.00
Average method complexity1.37
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon.png1.69KB0.90KB▼ 46.54%
images/icon32.png3.17KB1.71KB▼ 45.87%